diff --git a/web/templates/canada_covid19/export.js b/web/templates/canada_covid19/export.js index 70e05304..18f5a076 100644 --- a/web/templates/canada_covid19/export.js +++ b/web/templates/canada_covid19/export.js @@ -529,6 +529,9 @@ export default { ['SUBMITTED_RESLT - Gene Target #3 CT Value', []], ['PH_CANCOGEN_AUTHORS', []], ['HC_COMMENTS', []], + + ['host (scientific name)', []] // Special rule below + ]); const sourceFields = dh.getFields(dh.table); @@ -558,6 +561,7 @@ export default { for (const inputRow of dh.getTrimmedData(dh.hot)) { const outputRow = []; + for (const [headerName, sources] of ExportHeaders) { if (headerName === 'HC_CURRENT_ID') { // Assign constant value. @@ -587,6 +591,8 @@ export default { } // A complicated rule about what is stored in 'Specimen Source' + // Note that common name field will override scientific name in + // export to PH_SPECIMEN_SOURCE if (headerName === 'PH_SPECIMEN_SOURCE') { let cellValue = ''; for (const fieldName of [ @@ -595,19 +601,21 @@ export default { 'environmental material', 'environmental site', ]) { - const value = inputRow[sourceFieldNameMap[fieldName]]; + let value = inputRow[sourceFieldNameMap[fieldName]]; // Ignore all null value types if (!value || null_values.has(value)) { continue; } + value = value.toLowerCase(); if ( - fieldName === 'host (scientific name)' || + fieldName === 'host (scientific name)' || fieldName === 'host (common name)' ) { - if (value === 'Homo sapiens' || value === 'Human') + if (value === 'homo sapiens' || value === 'human') cellValue = 'Human'; - else cellValue = 'ANIMAL'; + else + cellValue = 'ANIMAL'; break; } if ( diff --git a/web/templates/canada_covid19/schema.json b/web/templates/canada_covid19/schema.json index 0b3c947f..1782b6ea 100644 --- a/web/templates/canada_covid19/schema.json +++ b/web/templates/canada_covid19/schema.json @@ -2306,10 +2306,7 @@ "permissible_values": { "Homo sapiens": { "text": "Homo sapiens", - "meaning": "NCBITaxon:9606", - "exact_mappings": [ - "NML_LIMS:Human" - ] + "meaning": "NCBITaxon:9606" }, "Bos taurus": { "text": "Bos taurus", diff --git a/web/templates/canada_covid19/schema.yaml b/web/templates/canada_covid19/schema.yaml index f2d4cc43..15c82fa5 100644 --- a/web/templates/canada_covid19/schema.yaml +++ b/web/templates/canada_covid19/schema.yaml @@ -4408,8 +4408,6 @@ enums: Homo sapiens: text: Homo sapiens meaning: NCBITaxon:9606 - exact_mappings: - - NML_LIMS:Human Bos taurus: text: Bos taurus meaning: NCBITaxon:9913 diff --git a/web/templates/canada_covid19/schema_enums.tsv b/web/templates/canada_covid19/schema_enums.tsv index 72cde8ff..a191c2e4 100644 --- a/web/templates/canada_covid19/schema_enums.tsv +++ b/web/templates/canada_covid19/schema_enums.tsv @@ -496,7 +496,7 @@ collection device menu ENVO:00003968 Air filter OBI:0002866 Virus Transport Medium -host (scientific name) menu NCBITaxon:9606 Homo sapiens Human +host (scientific name) menu NCBITaxon:9606 Homo sapiens NCBITaxon:9913 Bos taurus NCBITaxon:9615 Canis lupus familiaris NCBITaxon:9397 Chiroptera diff --git a/web/templates/monkeypox/export.js b/web/templates/monkeypox/export.js index 8cca599b..4f3ed335 100644 --- a/web/templates/monkeypox/export.js +++ b/web/templates/monkeypox/export.js @@ -320,7 +320,7 @@ export default { ['PH_REASON_FOR_SEQUENCING_DETAILS', []], ['PH_SEQUENCING_DATE', []], ['PH_LIBRARY_PREP_KIT', []], - + ['PH_SEQUENCING_INSTRUMENT', []], ['PH_TESTING_PROTOCOL', []], //['PH_SEQ_PROTOCOL_NAME', []], ['PH_RAW_SEQUENCE_METHOD', []], @@ -347,7 +347,7 @@ export default { ['SUBMITTED_RESLT - Gene Target #5', []], ['SUBMITTED_RESLT - Gene Target #5 CT Value', []], - ['PH_CANCOGEN_AUTHORS', []], + ['PH_SEQUENCING_AUTHORS', []], ['HC_COMMENTS', []], ['sample collector contact email', []], @@ -428,6 +428,8 @@ export default { } // A complicated rule about what is stored in 'Specimen Source' + // Note that common name field will override scientific name in + // export to PH_SPECIMEN_SOURCE if (headerName === 'PH_SPECIMEN_SOURCE') { let cellValue = ''; for (const fieldName of [ diff --git a/web/templates/monkeypox/schema.json b/web/templates/monkeypox/schema.json index 876a434f..0256c6f5 100644 --- a/web/templates/monkeypox/schema.json +++ b/web/templates/monkeypox/schema.json @@ -1597,10 +1597,7 @@ "permissible_values": { "Homo sapiens": { "text": "Homo sapiens", - "meaning": "NCBITaxon:9606", - "exact_mappings": [ - "NML_LIMS:Human" - ] + "meaning": "NCBITaxon:9606" } } }, @@ -1610,10 +1607,7 @@ "permissible_values": { "Homo sapiens [NCBITaxon:9606]": { "text": "Homo sapiens [NCBITaxon:9606]", - "meaning": "NCBITaxon:9606", - "exact_mappings": [ - "NML_LIMS:Human" - ] + "meaning": "NCBITaxon:9606" } } }, @@ -12543,7 +12537,7 @@ "annotations": { "version": { "tag": "version", - "value": "3.3.2" + "value": "3.3.3" } }, "description": "International specification for Monkeypox clinical virus biosample data gathering", diff --git a/web/templates/monkeypox/schema.yaml b/web/templates/monkeypox/schema.yaml index c826a933..b0c75298 100644 --- a/web/templates/monkeypox/schema.yaml +++ b/web/templates/monkeypox/schema.yaml @@ -783,7 +783,7 @@ classes: is_a: dh_interface see_also: templates/monkeypox/SOP_Monkeypox_international.pdf annotations: - version: 3.3.2 + version: 3.3.3 slots: - specimen collector sample ID - case ID @@ -4117,16 +4117,12 @@ enums: Homo sapiens: text: Homo sapiens meaning: NCBITaxon:9606 - exact_mappings: - - NML_LIMS:Human host (scientific name) international menu: name: host (scientific name) international menu permissible_values: Homo sapiens [NCBITaxon:9606]: text: Homo sapiens [NCBITaxon:9606] meaning: NCBITaxon:9606 - exact_mappings: - - NML_LIMS:Human host health state menu: name: host health state menu permissible_values: diff --git a/web/templates/monkeypox/schema_core.yaml b/web/templates/monkeypox/schema_core.yaml index b36a2316..2e414bc5 100644 --- a/web/templates/monkeypox/schema_core.yaml +++ b/web/templates/monkeypox/schema_core.yaml @@ -25,7 +25,7 @@ classes: is_a: dh_interface see_also: templates/monkeypox/SOP_Monkeypox_international.pdf annotations: - version: 3.3.2 + version: 3.3.3 slots: {} enums: {} types: diff --git a/web/templates/monkeypox/schema_enums.tsv b/web/templates/monkeypox/schema_enums.tsv index e3a1adf9..8abba759 100644 --- a/web/templates/monkeypox/schema_enums.tsv +++ b/web/templates/monkeypox/schema_enums.tsv @@ -325,9 +325,9 @@ host (common name) international menu NCBITaxon:9606 Human [NCBITaxon:9606] NCBITaxon:10116 Rat FOODON:03411389 Squirrel -host (scientific name) menu NCBITaxon:9606 Homo sapiens Human +host (scientific name) menu NCBITaxon:9606 Homo sapiens -host (scientific name) international menu NCBITaxon:9606 Homo sapiens [NCBITaxon:9606] Human +host (scientific name) international menu NCBITaxon:9606 Homo sapiens [NCBITaxon:9606] host health state menu NCIT:C3833 Asymptomatic NCIT:C28554 Deceased