TcmSpeciesAuthenticationDNAChecker
Tcm Species Authentication DNA
ℹ️ Utility performs species identification of medicinal plant and animal raw materials by DNA barcoding according to ChP 2020 (Chapter 2351) and CBOL recommendations:
• Sequence match with reference specimen (≥99%)
• K2P genetic distance (≤0.01 for intraspecific confirmation)
• Verification of nearest taxonomic neighbor in database
• Quantitative determination of adulterant/falsifier DNA (≤1%)
• Screening for forbidden and toxic species (Aristolochia, raw Aconitum, Ephedra excess)
• Extracted DNA quality control (OD260/280: 1.8–2.0)
⚠️ CRITICAL: DNA barcoding is the ONLY RELIABLE METHOD for:
• Powders and extracts (microscopy impossible)
• Closely related species (Panax ginseng vs P. quinquefolius vs P. notoginseng)
• Detection of substitution with dangerous species (Stephania → Aristolochia = nephropathy!)
• Identification of animal raw materials (Cordyceps, Gecko, Snake bile)
Species misidentification is the #1 cause of severe adverse reactions in TCM.
Usage:
TcmSpeciesAuthenticationDNAChecker.exe → demo mode (console output)
TcmSpeciesAuthenticationDNAChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ClaimedSpecies,BarcodeRegion,Identity%,K2P_Distance,NearestNeighbor,DNA_ng_ul,OD260_280,Adulterant%,ForbiddenDetected
Example:
TCM-001,Panax_ginseng,ITS2,99.8,0.002,Panax_ginseng,45.0,1.92,0.0,0
Recommended barcode regions:
• ITS2 — universal nuclear barcode for plants (ChP standard)
• psbA-trnH — chloroplast, high resolution for closely related species
• matK / rbcL — supplementary barcodes for complex taxa
• COI (cytochrome c oxidase I) — standard for animal raw materials
• trnL-F — for degraded DNA (processed/old samples)
— WHY IS THIS NEEDED?
Traditional identification methods (morphology, microscopy, TLC) have serious limitations:
• Impossible for powders, granules, extracts, capsules
• Subjective and dependent on expert experience
• Cannot distinguish genetically close species with different toxicity
• Do not detect adulteration <10-20%
• Do not reveal forbidden species in intentional substitution
DNA barcoding solves ALL these problems and is the gold standard for TCM authentication.
⚠️ CRITICAL:
• Sequence Identity ≥99% — confirmation of species identity
• K2P Distance ≤0.01 — intraspecific variation (barcode gap)
• Species Match — nearest match MUST be the claimed species
• Adulterant DNA ≤1% — detection threshold for quantitative admixture
• Forbidden Species = ABSENT — zero tolerance for toxic species
• OD260/280 = 1.8–2.0 — DNA purity (no proteins/polysaccharides)
Key features:
• Multi-parameter assessment: Identity + Distance + Species Match + Adulterants
• Automatic detection of forbidden species with critical warning
• Support for all major barcode regions (ITS2, psbA-trnH, matK, rbcL, COI)
• Quantitative assessment of falsification degree (% foreign DNA)
• DNA quality control to exclude false-negative results
• Full compatibility with GenBank, BOLD, TCM-ID, Herb-DNAbarcode databases
Critical parameters:
• Sequence Identity: ≥99.0%
• K2P Genetic Distance: ≤0.01
• Species Match: Exact match to claimed species
• Adulterant DNA: ≤1.0%
• Forbidden Species: Not Detected
• DNA Quality (OD260/280): 1.8–2.0
💡 Usage tips:
1. Use minimum 2 barcode regions for complex taxa (ITS2 + psbA-trnH)
2. Reference database must contain verified voucher specimens
3. For processed raw materials (Paozhi), use mini-barcodes (<200 bp) due to DNA degradation
4. If K2P is 0.01–0.05, result is doubtful — additional region sequencing required
5. Positive result for forbidden species requires immediate batch quarantine and RA/QA notification
6. Regularly update reference database with new entries from validated sources
⚠️ Note: DNA authentication fills a CRITICAL GAP in TCM QC system that no Western pharmacopoeia covers. Ph.Eur. and BHP rely on morphology and chemistry, which is insufficient for ~30% of TCM substitution cases. This utility implements molecular-level control compliant with modern WHO and NMPA requirements. It is especially important for imported raw materials where supply chain is long and substitution risk is maximal. Without DNA testing, it is impossible to guarantee that patient receives exactly the plant prescribed by practitioner.
input.csv
BatchNumber,ClaimedSpecies,BarcodeRegion,SequenceIdentityPercent,GeneticDistance,NearestNeighborSpecies,DnaConcentration_ng_ul,OD260_280_Ratio,AdulterantDnaPercent,ForbiddenSpeciesDetected TCM-PANAX-AUTH-2026-001,Panax_ginseng,ITS2,99.8,0.002,Panax_ginseng,45.0,1.92,0.0,0 TCM-NOTOGINSENG-2026-002,Panax_notoginseng,ITS2,99.5,0.004,Panax_notoginseng,38.0,1.88,0.5,0 TCM-STEPHANIA-FAIL-2026-003,Stephania_tetrandra,psbA-trnH,87.5,0.145,Aristolochia_fangchi,32.0,1.85,15.0,1 TCM-CORDYCEPS-MIX-2026-004,Ophiocordyceps_sinensis,ITS2,96.2,0.035,Ophiocordyceps_sinensis,28.0,1.75,8.5,0 TCM-DENDROBIUM-2026-005,Dendrobium_officinale,psbA-trnH,99.9,0.001,Dendrobium_officinale,52.0,1.95,0.0,0
TcmSpeciesAuthenticationDNAChecker — URS & FS
TCM Species Authentication DNA Checker
TCM Species Authentication DNA Checker
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты TcmSpeciesAuthenticationDNAChecker. Утилита предназначена для детерминированной проверки данных input.csv, формирования структурированного результата output.json и поддержки прослеживаемого QA/QC review.
Документ является проектной URS/FS-основой для CSV/CSA, IQ/OQ/PQ и дальнейшей валидации в контексте конкретной лабораторной процедуры.
2. Исходное описание утилиты
3. URS — пользовательские требования
3.1 Цель и область применения
Система должна принимать табличные результаты лабораторного контроля, выполнять проверку по заранее заданным критериям и возвращать понятный статус по каждой серии/записи: Pass, Review или Fail.
3.2 Нормативная / методическая база
В исходном описании и правилах утилиты используются следующие ориентиры: ChP 2020, ChP, EP, Ph.Eur, Ph.Eur., BHP, WHO, ICH, CBOL. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- Совпадение последовательности с референсным образцом (≥99%)
- Генетическая дистанция K2P (≤0.01 для подтверждения внутривидовой принадлежности)
- Верификация ближайшего таксономического соседа в базе данных
- Количественное определение ДНК примесей/фальсификатов (≤1%)
- Скрининг запрещённых и токсичных видов (Aristolochia, Aconitum raw, Ephedra excess)
- Контроль качества выделенной ДНК (OD260/280: 1.8–2.0)
- Порошков и экстрактов (микроскопия невозможна)
- Близкородственных видов (Panax ginseng vs P. quinquefolius vs P. notoginseng)
3.4 Пользователи
- QC analyst — подготовка и загрузка
input.csv. - QA/QC reviewer — проверка результата и отклонений.
- CSV/validation specialist — подтверждение пригодности утилиты.
- System owner — управление версией, доступом и изменениями.
3.5 Требования к данным и Data Integrity
- каждая строка CSV должна быть прослеживаемой к серии, образцу или измерению;
- исходные значения не должны изменяться утилитой;
- расчёты должны быть воспроизводимыми при повторном запуске;
- любое отклонение должно сохраняться как структурированное finding с указанием поля и правила;
- ручное изменение итогового статуса вне QA-процесса не допускается.
4. FS — функциональная спецификация
4.1 Поток обработки
- Проверить наличие и кодировку
input.csv. - Проверить заголовки, обязательные поля и типы данных.
- Нормализовать числовые и булевы значения без изменения исходного следа.
- Выбрать набор правил по категории продукта/типа, если он предусмотрен.
- Сравнить значения с лимитами и вычислить derived metrics.
- Сформировать запись результата по каждой строке.
- Сохранить
output.jsonс общей сводкой, findings и traceability.
4.2 CSV-схема
| № | Поле CSV | Тип | Обяз. | Назначение |
|---|---|---|---|---|
| 1 | BatchNumber | string | Да | Идентификатор серии / лота для прослеживаемости. |
| 2 | ClaimedSpecies | string | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 3 | BarcodeRegion | string | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 4 | SequenceIdentityPercent | decimal | Да | Классификация для выбора адаптивных лимитов или набора правил. |
| 5 | GeneticDistance | decimal | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 6 | NearestNeighborSpecies | string | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 7 | DnaConcentration_ng_ul | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 8 | OD260_280_Ratio | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 9 | AdulterantDnaPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 10 | ForbiddenSpeciesDetected | boolean | Да | Бинарный признак обнаружения для правил нулевой толерантности или предупреждений. |
4.3 Пример входных данных
| BatchNumber | ClaimedSpecies | BarcodeRegion | SequenceIdentityPercent | GeneticDistance | NearestNeighborSpecies | DnaConcentration_ng_ul | OD260_280_Ratio | AdulterantDnaPercent | ForbiddenSpeciesDetected |
|---|---|---|---|---|---|---|---|---|---|
| TCM-PANAX-AUTH-2026-001 | Panax_ginseng | ITS2 | 99.8 | 0.002 | Panax_ginseng | 45.0 | 1.92 | 0.0 | 0 |
| TCM-NOTOGINSENG-2026-002 | Panax_notoginseng | ITS2 | 99.5 | 0.004 | Panax_notoginseng | 38.0 | 1.88 | 0.5 | 0 |
| TCM-STEPHANIA-FAIL-2026-003 | Stephania_tetrandra | psbA-trnH | 87.5 | 0.145 | Aristolochia_fangchi | 32.0 | 1.85 | 15.0 | 1 |
| TCM-CORDYCEPS-MIX-2026-004 | Ophiocordyceps_sinensis | ITS2 | 96.2 | 0.035 | Ophiocordyceps_sinensis | 28.0 | 1.75 | 8.5 | 0 |
| TCM-DENDROBIUM-2026-005 | Dendrobium_officinale | psbA-trnH | 99.9 | 0.001 | Dendrobium_officinale | 52.0 | 1.95 | 0.0 | 0 |
4.4 Выходной JSON
{
"utility": "TcmSpeciesAuthenticationDNAChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 5,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-PANAX-AUTH-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-PANAX-AUTH-2026-001",
"ClaimedSpecies": "Panax_ginseng",
"BarcodeRegion": "ITS2",
"SequenceIdentityPercent": "99.8",
"GeneticDistance": "0.002",
"NearestNeighborSpecies": "Panax_ginseng",
"DnaConcentration_ng_ul": "45.0",
"OD260_280_Ratio": "1.92"
}
}
],
"dataIntegrity": {
"deterministicEvaluation": true,
"sourceRowTraceability": true,
"manualOverrideAllowed": false
}
}
5. Трассировка URS → FS → тесты
| URS | FS-механизм | Проверка |
|---|---|---|
| Загрузка корректного input.csv | CSV parser + schema validator | OQ: валидный/невалидный CSV |
| Детерминированная оценка лимитов | Rule engine с фиксированной конфигурацией | OQ: граничные значения и known expected results |
| Статусы Pass/Review/Fail | Status aggregator по findings | OQ/PQ: образцы с проходными и провальными сериями |
| Прослеживаемость к исходной строке | inputTrace + recordId | PQ: сверка output.json с исходным CSV |
| Поддержка QA review | структурированные findings и warnings | PQ: review сценарии и deviation handling |
6. CSV/CSA и валидационный подход
IQ
- проверка версии утилиты;
- проверка расположения исполняемого файла;
- проверка шаблона CSV;
- контроль прав доступа.
OQ
- проверка обязательных полей;
- проверка типов данных;
- проверка граничных значений;
- проверка zero-tolerance правил.
PQ
- прогоны на реальных/репрезентативных данных;
- сверка с ручным расчётом;
- подтверждение QA review workflow.
Change control
- версионирование лимитов;
- impact assessment при изменении правил;
- регрессия после обновления.
1. Document purpose
This document defines user requirements (URS) and functional specification (FS) for TcmSpeciesAuthenticationDNAChecker. The utility is intended to evaluate input.csv data deterministically, generate structured output.json output and support traceable QA/QC review.
This document is a project-level URS/FS baseline for CSV/CSA, IQ/OQ/PQ and further validation under an approved laboratory procedure.
2. Source utility description
3. URS — user requirements
3.1 Intended use and scope
The system shall accept tabular laboratory QC results, evaluate them against configured acceptance criteria and return a clear status for each batch or record: Pass, Review or Fail.
3.2 Regulatory / methodological basis
The source description and utility rules refer to the following framework: ChP 2020, ChP, EP, Ph.Eur, Ph.Eur., BHP, WHO, ICH, CBOL. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- Sequence match with reference specimen (≥99%)
- K2P genetic distance (≤0.01 for intraspecific confirmation)
- Verification of nearest taxonomic neighbor in database
- Quantitative determination of adulterant/falsifier DNA (≤1%)
- Screening for forbidden and toxic species (Aristolochia, raw Aconitum, Ephedra excess)
- Extracted DNA quality control (OD260/280: 1.8–2.0)
- Powders and extracts (microscopy impossible)
- Closely related species (Panax ginseng vs P. quinquefolius vs P. notoginseng)
3.4 Users
- QC analyst — prepares and loads
input.csv. - QA/QC reviewer — reviews output, findings and deviations.
- CSV/validation specialist — confirms fitness for intended use.
- System owner — controls versioning, access and change management.
3.5 Data and data-integrity requirements
- each CSV row shall be traceable to a batch, sample or analytical measurement;
- source values shall not be modified by the utility;
- calculations shall be reproducible on repeated execution;
- each deviation shall be captured as a structured finding with field and rule references;
- manual override of the final status outside QA process is not allowed.
4. FS — functional specification
4.1 Processing flow
- Verify presence and encoding of
input.csv. - Validate headers, mandatory fields and data types.
- Normalize numeric and boolean values while preserving the source trace.
- Select an adaptive rule set by product/category type, where applicable.
- Compare values with limits and compute derived metrics.
- Create a result record for each input row.
- Write
output.jsonwith summary, findings and traceability.
4.2 CSV schema
| # | CSV field | Type | Req. | Purpose |
|---|---|---|---|---|
| 1 | BatchNumber | string | Yes | Batch / lot identifier used for traceability. |
| 2 | ClaimedSpecies | string | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 3 | BarcodeRegion | string | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 4 | SequenceIdentityPercent | decimal | Yes | Classification used to select adaptive limits or rule set. |
| 5 | GeneticDistance | decimal | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 6 | NearestNeighborSpecies | string | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 7 | DnaConcentration_ng_ul | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 8 | OD260_280_Ratio | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 9 | AdulterantDnaPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 10 | ForbiddenSpeciesDetected | boolean | Yes | Binary detection flag used for zero-tolerance or warning rules. |
4.3 Input data example
| BatchNumber | ClaimedSpecies | BarcodeRegion | SequenceIdentityPercent | GeneticDistance | NearestNeighborSpecies | DnaConcentration_ng_ul | OD260_280_Ratio | AdulterantDnaPercent | ForbiddenSpeciesDetected |
|---|---|---|---|---|---|---|---|---|---|
| TCM-PANAX-AUTH-2026-001 | Panax_ginseng | ITS2 | 99.8 | 0.002 | Panax_ginseng | 45.0 | 1.92 | 0.0 | 0 |
| TCM-NOTOGINSENG-2026-002 | Panax_notoginseng | ITS2 | 99.5 | 0.004 | Panax_notoginseng | 38.0 | 1.88 | 0.5 | 0 |
| TCM-STEPHANIA-FAIL-2026-003 | Stephania_tetrandra | psbA-trnH | 87.5 | 0.145 | Aristolochia_fangchi | 32.0 | 1.85 | 15.0 | 1 |
| TCM-CORDYCEPS-MIX-2026-004 | Ophiocordyceps_sinensis | ITS2 | 96.2 | 0.035 | Ophiocordyceps_sinensis | 28.0 | 1.75 | 8.5 | 0 |
| TCM-DENDROBIUM-2026-005 | Dendrobium_officinale | psbA-trnH | 99.9 | 0.001 | Dendrobium_officinale | 52.0 | 1.95 | 0.0 | 0 |
4.4 Output JSON
{
"utility": "TcmSpeciesAuthenticationDNAChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 5,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-PANAX-AUTH-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-PANAX-AUTH-2026-001",
"ClaimedSpecies": "Panax_ginseng",
"BarcodeRegion": "ITS2",
"SequenceIdentityPercent": "99.8",
"GeneticDistance": "0.002",
"NearestNeighborSpecies": "Panax_ginseng",
"DnaConcentration_ng_ul": "45.0",
"OD260_280_Ratio": "1.92"
}
}
],
"dataIntegrity": {
"deterministicEvaluation": true,
"sourceRowTraceability": true,
"manualOverrideAllowed": false
}
}
5. Traceability URS → FS → tests
| URS | FS mechanism | Test evidence |
|---|---|---|
| Load valid input.csv | CSV parser + schema validator | OQ: valid/invalid CSV cases |
| Deterministic limit evaluation | Rule engine with fixed configuration | OQ: boundary values and known expected results |
| Pass/Review/Fail statuses | Status aggregator based on findings | OQ/PQ: passing and failing representative batches |
| Traceability to source row | inputTrace + recordId | PQ: output.json reconciliation to source CSV |
| QA review support | structured findings and warnings | PQ: review and deviation-handling scenarios |
6. CSV/CSA and validation approach
IQ
- utility version check;
- executable location check;
- CSV template check;
- access-right verification.
OQ
- mandatory field checks;
- data type checks;
- boundary-value checks;
- zero-tolerance rule checks.
PQ
- runs on real or representative data;
- comparison with manual calculation;
- confirmation of QA review workflow.
Change control
- rule and limit versioning;
- impact assessment for rule changes;
- regression after updates.
Included in packages
Traditional Chinese Medicine (TCM) QC Suite
QC utility package for TCM: botanical identity, fingerprint consistency, marker compounds, decoction pieces, Paozhi processing, pesticides, mycotoxins, heavy metals, sulfur fumigation, microbial limits and adulteration screening.
Open