diff --git a/lib/seattleflu/id3c/cli/command/clinical.py b/lib/seattleflu/id3c/cli/command/clinical.py index e6a0535b..751f3cde 100644 --- a/lib/seattleflu/id3c/cli/command/clinical.py +++ b/lib/seattleflu/id3c/cli/command/clinical.py @@ -59,10 +59,11 @@ def clinical(): # Parse sequencing accessions subcommand @clinical.command("parse-sequencing") @click.argument("accession_ids_filename", metavar = "") +@click.argument("record_type", metavar="", type=click.Choice(['covid','rsv'])) @click.option("-o", "--output", metavar="", help="The filename for the output of missing barcodes") -def parse_sequencing_accessions(accession_ids_filename, output): +def parse_sequencing_accessions(accession_ids_filename, record_type, output): """ Process sequencing accession IDs file. @@ -99,10 +100,13 @@ def parse_sequencing_accessions(accession_ids_filename, output): 'genbank_accession': 'genbank_accession', '_provenance': '_provenance' } + if record_type=='rsv': + column_map['pathogen'] = 'pathogen' clinical_records = clinical_records[(clinical_records['sfs_sample_barcode'].notnull())&(clinical_records.status=='submitted')].rename(columns=column_map) - barcode_quality_control(clinical_records, output) + if record_type=='covid': + barcode_quality_control(clinical_records, output) # Drop columns we're not tracking clinical_records = clinical_records[column_map.values()]