Herbal_Chromatographic_Fingerprint_Analyzer
Herbal Chromatographic Fingerprint Analyzer
ℹ️ Utility evaluates chromatogram similarity with reference pattern:
• Cosine similarity (≥0.95)
• Correlation coefficient (≥0.98)
• Presence of common and marker peaks
• Retention time stability
⚠️ CRITICAL: Fingerprint is the 'passport' of the herb!
Low similarity indicates species substitution or poor quality.
Usage:
HerbalChromatographicFingerprintAnalyzer.exe → demo mode (console output)
HerbalChromatographicFingerprintAnalyzer.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,ReferencePatternId,Cosine_Similarity,Correlation_Coefficient,Euclidean_Distance_Normalized,Common_Peaks_Count,Required_Marker_Peaks,Detected_Marker_Peaks,Max_RT_Drift_Min
Example:
TCM-FP-2026-001,Panax Notoginseng Extract,REF-PN-001,0.985,0.992,0.05,12,5,5,0.2
— WHY IS THIS NEEDED?
Chromatographic fingerprint control is critical for TCM and herbal products (Yunnan Baiyao, Tong Ren Tang):
• Herbs contain hundreds of compounds, and one molecule cannot characterize quality
• "Fingerprint" reflects holistic chemical profile
• Allows detection of adulteration (species substitution)
• Controls raw material stability from different geographic zones and harvests
• Required by pharmacopoeias (ChP, USP) for registration of complex herbal products
⚠️ CRITICAL:
• Cosine similarity ≥0.95 — standard for recognizing batch as identical to reference
• Correlation coefficient ≥0.98 — high linear relationship of profiles
• All marker peaks (characteristic for species) must be present
• Retention time drift ≤0.5 min — guarantee of chromatography correctness
• No extra peaks indicating contaminants
Key features:
• Similarity metrics calculation (Cosine, Pearson, Euclidean)
• Specific marker peak presence check
• Chromatographic system stability assessment
• Support for various detection types (DAD, ELSD, MS)
Critical parameters:
• Cosine Similarity: ≥0.95
• Correlation Coefficient: ≥0.98
• Marker peaks: 100% presence
• RT Drift: ≤0.5 min
💡 Usage tips:
1. Use standardized extraction and chromatography conditions
2. Perform baseline alignment before similarity calculation
3. For complex mixtures, use multi-wavelength detection (DAD)
4. Create library of reference fingerprints for each raw material supplier
5. Combine fingerprint analysis with quantitative determination of main markers
⚠️ Note: Unlike synthetic drugs where impurities are regulated individually, in herbs the overall balance of components is important. Change in ratio of even minor peaks may indicate change in growing or harvesting conditions, affecting therapeutic efficacy. The utility helps preserve this integrity.
input.csv
BatchNumber,ProductName,ReferencePatternId,Cosine_Similarity,Correlation_Coefficient,Euclidean_Distance_Normalized,Common_Peaks_Count,Required_Marker_Peaks,Detected_Marker_Peaks,Max_RT_Drift_Min TCM-FP-2026-001,Panax Notoginseng Extract,REF-PN-001,0.985,0.992,0.05,12,5,5,0.2 TCM-FP-2026-002,Astragalus Root,REF-AR-002,0.960,0.985,0.08,10,4,4,0.3 TCM-FP-2026-003,Ginseng Powder,REF-GP-003,0.850,0.900,0.25,6,5,3,0.8
Herbal Chromatographic Fingerprint Analyzer — URS and FS
The English user requirements and functional specification are provided below.
Herbal Chromatographic Fingerprint Analyzer — URS
Herbal Chromatographic Fingerprint Analyzer
This document is generated for the English localization. Non-Russian portal languages must use this English version, not a mixed Russian/English document.
Purpose
Define user requirements for a standalone FUZKK utility that accepts laboratory CSV data, evaluates the records using limits embedded in code, and produces LabWare-compatible JSON.
Scope
The utility is intended for preliminary QC/QA review, integration testing, LIMS/LabWare flow and evidence-trail preparation. Final release decisions remain under the laboratory's validated procedure and responsible personnel.
Users
QC analyst, QA reviewer, CSV/validation engineer, LIMS/LabWare integration engineer, responsible laboratory specialist.
User requirements
- The utility shall run without arguments and print its self-description, a built-in input.csv example from GetDemoData(), and demo evaluation for the embedded records.
- The utility shall run with two arguments: input.csv output.json.
- The utility shall not read input.csv and shall not write output.json when started without arguments.
- CSV numeric values shall be parsed using CultureInfo.InvariantCulture.
- Output shall be generated as LabWare-compatible JSON with Header, Samples, Results, Status, StatusCode, ErrorMessage, Description and DescriptionEN.
- For PASS records, ErrorMessage shall be an empty string.
- Embedded limits shall follow this priority: Ph. Eur. → British Pharmacopoeia / UK implementation → EAEU / regional requirements → EMA/ICH/EU guidance → USP fallback.
- If an exact monograph is not known, strict standard API limits are used where applicable: assay 98–102%, total impurities ≤1.0%, individual impurity ≤0.5%.
- For biologics and mAb-like products, aggregation, sterility and endotoxin checks shall be included where relevant to the utility purpose.
- If a parameter may arrive in different units, the unit shall be represented as a separate input field or explicitly reflected in the input.csv field name.
Input CSV
BatchNumber,ProductName,ReferencePatternId,Cosine_Similarity,Correlation_Coefficient,Euclidean_Distance_Normalized,Common_Peaks_Count,Required_Marker_Peaks,Detected_Marker_Peaks,Max_RT_Drift_Min TCM-FP-2026-001,Panax Notoginseng Extract,REF-PN-001,0.985,0.992,0.05,12,5,5,0.2 TCM-FP-2026-002,Astragalus Root,REF-AR-002,0.960,0.985,0.08,10,4,4,0.3 TCM-FP-2026-003,Ginseng Powder,REF-GP-003,0.850,0.900,0.25,6,5,3,0.8
input.csv fields
| Field | Sample |
|---|---|
| BatchNumber | TCM-FP-2026-001 |
| ProductName | Panax Notoginseng Extract |
| ReferencePatternId | REF-PN-001 |
| Cosine_Similarity | 0.985 |
| Correlation_Coefficient | 0.992 |
| Euclidean_Distance_Normalized | 0.05 |
| Common_Peaks_Count | 12 |
| Required_Marker_Peaks | 5 |
| Detected_Marker_Peaks | 5 |
| Max_RT_Drift_Min | 0.2 |
Utility description
Herbal Chromatographic Fingerprint Analyzer — Herbal Chromatographic Fingerprint Analyzer
Herbal Chromatographic Fingerprint Analyzer — Herbal Chromatographic Fingerprint Analyzer
ℹ️ Utility evaluates chromatogram similarity with reference pattern:
• Cosine similarity (≥0.95)
• Correlation coefficient (≥0.98)
• Presence of common and marker peaks
• Retention time stability
⚠️ CRITICAL: Fingerprint is the 'passport' of the herb!
Low similarity indicates species substitution or poor quality.
Usage:
HerbalChromatographicFingerprintAnalyzer.exe → demo mode (console output)
HerbalChromatographicFingerprintAnalyzer.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,ReferencePatternId,Cosine_Similarity,Correlation_Coefficient,Euclidean_Distance_Normalized,Common_Peaks_Count,Required_Marker_Peaks,Detected_Marker_Peaks,Max_RT_Drift_Min
Example:
TCM-FP-2026-001,Panax Notoginseng Extract,REF-PN-001,0.985,0.992,0.05,12,5,5,0.2
— WHY IS THIS NEEDED?
Chromatographic fingerprint control is critical for TCM and herbal products (Yunnan Baiyao, Tong Ren Tang):
• Herbs contain hundreds of compounds, and one molecule cannot characterize quality
• "Fingerprint" reflects holistic chemical profile
• Allows detection of adulteration (species substitution)
• Controls raw material stability from different geographic zones and harvests
• Required by pharmacopoeias (ChP, USP) for registration of complex herbal products
⚠️ CRITICAL:
• Cosine similarity ≥0.95 — standard for recognizing batch as identical to reference
• Correlation coefficient ≥0.98 — high linear relationship of profiles
• All marker peaks (characteristic for species) must be present
• Retention time drift ≤0.5 min — guarantee of chromatography correctness
• No extra peaks indicating contaminants
Key features:
• Similarity metrics calculation (Cosine, Pearson, Euclidean)
• Specific marker peak presence check
• Chromatographic system stability assessment
• Support for various detection types (DAD, ELSD, MS)
Critical parameters:
• Cosine Similarity: ≥0.95
• Correlation Coefficient: ≥0.98
• Marker peaks: 100% presence
• RT Drift: ≤0.5 min
💡 Usage tips:
1. Use standardized extraction and chromatography conditions
2. Perform baseline alignment before similarity calculation
3. For complex mixtures, use multi-wavelength detection (DAD)
4. Create library of reference fingerprints for each raw material supplier
5. Combine fingerprint analysis with quantitative determination of main markers
⚠️ Note: Unlike synthetic drugs where impurities are regulated individually, in herbs the overall balance of components is important. Change in ratio of even minor peaks may indicate change in growing or harvesting conditions, affecting therapeutic efficacy. The utility helps preserve this integrity.
Traceability and limitations
- The URS is used as the source document for functional specification, CSV review and later validation work.
- This document does not replace an approved pharmacopoeial monograph, validated analytical method or internal product specification.
- For product-specific limits, the approved customer specification takes priority.
Herbal Chromatographic Fingerprint Analyzer — FS
Herbal Chromatographic Fingerprint Analyzer
The functional specification describes the behaviour of the standalone FUZKK console utility, input-data format, evaluation algorithm and output JSON structure.
Functional flow
- Main() checks the number of arguments.
- If no arguments are provided: PrintHello() prints the description and built-in input.csv example, then RunDemoEvaluation() executes Evaluate() over GetDemoData() and prints demo JSON.
- If two arguments are provided: RunWithFiles(input.csv, output.json) reads CSV, evaluates each record and writes LabWare-compatible JSON.
- LoadData() uses CultureInfo.InvariantCulture and shall not be called in no-arguments mode.
- Evaluate() returns a named tuple with BatchNumber, ProductName, Parameters, CriticalFailCount, WarningCount, Recommendation and RecommendationEN.
- GetIssues() builds messages for ErrorMessage in WARNING/FAIL cases.
Evaluation rules
- PASS: CriticalFailCount = 0 and WarningCount = 0.
- WARNING: CriticalFailCount = 0 and WarningCount > 0.
- FAIL: CriticalFailCount > 0.
- ERROR: exception during reading or processing.
- ErrorMessage remains empty for PASS.
- Limits are embedded in Program.cs; no external limit configuration is required.
Input and fields
BatchNumber,ProductName,ReferencePatternId,Cosine_Similarity,Correlation_Coefficient,Euclidean_Distance_Normalized,Common_Peaks_Count,Required_Marker_Peaks,Detected_Marker_Peaks,Max_RT_Drift_Min TCM-FP-2026-001,Panax Notoginseng Extract,REF-PN-001,0.985,0.992,0.05,12,5,5,0.2 TCM-FP-2026-002,Astragalus Root,REF-AR-002,0.960,0.985,0.08,10,4,4,0.3 TCM-FP-2026-003,Ginseng Powder,REF-GP-003,0.850,0.900,0.25,6,5,3,0.8
| Field | Sample |
|---|---|
| BatchNumber | TCM-FP-2026-001 |
| ProductName | Panax Notoginseng Extract |
| ReferencePatternId | REF-PN-001 |
| Cosine_Similarity | 0.985 |
| Correlation_Coefficient | 0.992 |
| Euclidean_Distance_Normalized | 0.05 |
| Common_Peaks_Count | 12 |
| Required_Marker_Peaks | 5 |
| Detected_Marker_Peaks | 5 |
| Max_RT_Drift_Min | 0.2 |
Output JSON
{
"Header": {
"UtilityName": "Herbal_Chromatographic_Fingerprint_Analyzer",
"Version": "1.0.0",
"Timestamp": "UTC",
"InstrumentID": "FUZKK-QC-WORKSTATION",
"OperatorID": "Admin"
},
"Samples": [
{
"SampleID": "from BatchNumber",
"BatchNumber": "from CSV",
"ProductName": "from CSV",
"TestName": "utility-specific test",
"AnalysisCode": "utility-specific code",
"Status": "PASS | WARNING | FAIL | ERROR",
"StatusCode": "1 | 2 | 0 | -1",
"ErrorMessage": "",
"Description": "Russian recommendation",
"DescriptionEN": "English recommendation",
"Results": [
{
"ParameterName": "parameter",
"ResultValue": 0.0,
"UnitOfMeasure": "unit",
"SpecificationLimit": "limit",
"IsWithinSpec": true
}
]
}
]
}Included in packages
Herbal / TCM / Ayurveda Instrumental QC Suite
Herbal / TCM / Ayurveda Instrumental QC Suite: FUZKK utility package for CSV→JSON QC checks with EU-first limit priority.
Open