diff --git a/CHANGELOG.md b/CHANGELOG.md index 4123789..84e010a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Added + - Added flag to set verbosity level. + - Validate TbProfiler schema version. + - Added CLI command for adding IGV annotation tracks + ### Fixed ### Changed diff --git a/prp/cli.py b/prp/cli.py index 8bffcda..60383df 100644 --- a/prp/cli.py +++ b/prp/cli.py @@ -37,14 +37,14 @@ parse_virulencefinder_stx_typing, parse_virulencefinder_vir_pred, ) +from .parse.phenotype.tbprofiler import ( + EXPECTED_SCHEMA_VERSION as EXPECTED_TBPROFILER_SCHEMA_VERSION, +) from .parse.metadata import get_database_info, get_gb_genome_version, parse_run_info from .parse.species import get_mykrobe_spp_prediction from .parse.utils import _get_path, get_db_version, parse_input_dir from .parse.variant import annotate_delly_variants -logging.basicConfig( - level=logging.INFO, format="[%(asctime)s] %(levelname)s in %(module)s: %(message)s" -) LOG = logging.getLogger(__name__) OUTPUT_SCHEMA_VERSION = 1 @@ -52,8 +52,20 @@ @click.group() @click.version_option(__version__) -def cli(): +@click.option("-s", "--silent", is_flag=True) +@click.option("-d", "--debug", is_flag=True) +def cli(silent, debug): """Jasen pipeline result processing tool.""" + if silent: + log_level = logging.WARNING + elif debug: + log_level = logging.DEBUG + else: + log_level = logging.INFO + # configure logging + logging.basicConfig( + level=log_level, format="[%(asctime)s] %(levelname)s in %(module)s: %(message)s" + ) @cli.command() @@ -287,6 +299,15 @@ def create_bonsai_input( LOG.info("Parse tbprofiler results") with open(tbprofiler, "r", encoding="utf-8") as tbprofiler_json: pred_res = json.load(tbprofiler_json) + # check schema version + schema_version = pred_res.get("schema_version") + if not EXPECTED_TBPROFILER_SCHEMA_VERSION == schema_version: + LOG.warning( + "Unsupported TbProfiler schema version - output might be inaccurate; result schema: %s; expected: %s", + schema_version, + EXPECTED_TBPROFILER_SCHEMA_VERSION, + ) + # store pipeline version db_info: list[SoupVersion] = [] db_info = [ SoupVersion( @@ -521,3 +542,41 @@ def annotate_delly(vcf, bed, output): annotate_delly_variants(writer, vcf_obj, annotation, annot_chrom=annot_chrom) click.secho(f"Wrote annotated delly variants to {output}", fg="green") + + +@cli.command() +@click.option("-n", "--name", type=str, help="Track name.") +@click.option( + "-a", "--annotation-file", type=click.Path(exists=True), help="Path to file." +) +@click.option( + "-r", + "--result", + required=True, + type=click.Path(writable=True), + help="PRP result.", +) +@click.argument("output", type=click.File("w")) +def add_igv_annotation_track(name, annotation_file, result, output): + """Add IGV annotation track to result.""" + with open(result, "r", encoding="utf-8") as jfile: + result_obj = PipelineResult(**json.load(jfile)) + + # Get genome annotation + if result_obj.genome_annotation is None or isinstance( + result_obj.genome_annotation, list + ): + track_info = [] + else: + track_info = result.genome_annotation + + # add new tracks + track_info.append({"name": name, "file": annotation_file}) + + # update data model + upd_result = result_obj.model_copy(update={"genome_annotation": track_info}) + + # overwrite result + output.write(upd_result.model_dump_json(indent=3)) + + click.secho(f"Wrote updated result to {output}", fg="green") diff --git a/prp/models/sample.py b/prp/models/sample.py index 3d2e359..7d4f3a6 100644 --- a/prp/models/sample.py +++ b/prp/models/sample.py @@ -59,6 +59,13 @@ class ReferenceGenome(RWModel): genes: str +class IgvAnnotationTrack(RWModel): + """IGV annotation track data.""" + + name: str # track name to display + file: str # path to the annotation file + + class PipelineResult(SampleBase): """Input format of sample object from pipeline.""" @@ -77,4 +84,4 @@ class PipelineResult(SampleBase): # optional alignment info reference_genome: Optional[ReferenceGenome] = None read_mapping: Optional[str] = None - genome_annotation: Optional[list[dict[str, str]]] = None + genome_annotation: Optional[list[IgvAnnotationTrack]] = None diff --git a/prp/parse/phenotype/tbprofiler.py b/prp/parse/phenotype/tbprofiler.py index d7e257e..731b82b 100644 --- a/prp/parse/phenotype/tbprofiler.py +++ b/prp/parse/phenotype/tbprofiler.py @@ -14,6 +14,7 @@ from ...models.phenotype import TbProfilerVariant, VariantSubType, VariantType LOG = logging.getLogger(__name__) +EXPECTED_SCHEMA_VERSION = "1.0.0" def _get_tbprofiler_amr_sr_profie(tbprofiler_result): diff --git a/tests/conftest.py b/tests/conftest.py index 3c1b8d0..9d217e4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,37 @@ """Test fixtures.""" from .fixtures import * +from prp.models import PipelineResult +from prp.models.metadata import RunMetadata, RunInformation +from datetime import datetime + + +@pytest.fixture() +def simple_pipeline_result(): + """Return a basic analysis result.""" + + mock_run_info = RunInformation( + pipeline="Jasen", + version="0.0.1", + commit="commit-hash", + analysis_profile="", + configuration_files=[], + workflow_name="workflow-name", + sample_name="sample-name", + lims_id="limbs id", + sequencing_run="run-id", + sequencing_platform="sequencing plattform", + sequencing_type="illumina", + command="nextflow run ...", + date=datetime.now(), + ) + # add run into to metadata model + metadata = RunMetadata(run=mock_run_info, databases=[]) + return PipelineResult( + sample_id="mock-sample-001", + run_metadata=metadata, + qc=[], + species_prediction=[], + typing_result=[], + element_type_result=[], + ) diff --git a/tests/fixtures/mtuberculosis/tbprofiler.json b/tests/fixtures/mtuberculosis/tbprofiler.json index 6245eb5..7f2e9bd 100644 --- a/tests/fixtures/mtuberculosis/tbprofiler.json +++ b/tests/fixtures/mtuberculosis/tbprofiler.json @@ -1,8 +1,9 @@ { - "id": "test_mtuberculosis_1", - "timestamp": "2024-05-15T15:21:24.742254", + "schema_version": "1.0.0", + "id": "tb_test_1", + "timestamp": "2024-08-08T14:46:20.513927", "pipeline": { - "software_version": "6.2.0", + "software_version": "6.3.0", "db_version": { "name": "converged_who_fohm_tbdb", "Date": "2024-05-08 16:25:28.388882", @@ -17,10 +18,6 @@ "process": "mapping", "software": "bwa" }, - { - "process": "variant_calling", - "software": "freebayes" - }, { "process": "depth_calculation", "software": "samtools" @@ -306,12 +303,12 @@ "pos": 761104, "ref": "TCATGGA", "alt": "T", - "depth": 165, - "freq": 0.9878787878787879, + "depth": 151, + "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 90, - "reverse_reads": 73, + "forward_reads": 89, + "reverse_reads": 62, "sv_len": null, "gene_id": "Rv0667", "gene_name": "rpoB", @@ -324,10 +321,10 @@ { "type": "drug_resistance", "drug": "rifampicin", - "original_mutation": "RRDR non-silent", + "original_mutation": "p.Met434_Asp435del", "confidence": "Assoc w R - Interim", "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" + "comment": "" }, { "type": "drug_resistance", @@ -350,10 +347,10 @@ { "type": "drug_resistance", "drug": "rifampicin", - "original_mutation": "RRDR non-silent", + "original_mutation": "p.Met434_Asp435del", "confidence": "Assoc w R - Interim", "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" + "comment": "" }, { "type": "drug_resistance", @@ -366,10 +363,10 @@ { "type": "drug_resistance", "drug": "rifampicin", - "original_mutation": "p.Met434_Asp435del", + "original_mutation": "RRDR non-silent", "confidence": "Assoc w R - Interim", "source": "WHO catalogue v2", - "comment": "" + "comment": "Expert rule: Non-silent variants in RRDR of rpoB" } ] } @@ -378,10 +375,10 @@ { "type": "drug_resistance", "drug": "rifampicin", - "original_mutation": "RRDR non-silent", + "original_mutation": "p.Met434_Asp435del", "confidence": "Assoc w R - Interim", "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" + "comment": "" }, { "type": "drug_resistance", @@ -402,12 +399,12 @@ "pos": 781822, "ref": "A", "alt": "G", - "depth": 240, - "freq": 0.9875, + "depth": 236, + "freq": 0.9957627118644068, "sv": false, "filter": "pass", "forward_reads": 101, - "reverse_reads": 136, + "reverse_reads": 134, "sv_len": null, "gene_id": "Rv0682", "gene_name": "rpsL", @@ -466,12 +463,12 @@ "pos": 2155168, "ref": "C", "alt": "G", - "depth": 154, + "depth": 152, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 72, - "reverse_reads": 82, + "forward_reads": 71, + "reverse_reads": 81, "sv_len": null, "gene_id": "Rv1908c", "gene_name": "katG", @@ -530,12 +527,12 @@ "pos": 4407686, "ref": "C", "alt": "A", - "depth": 233, + "depth": 221, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 115, - "reverse_reads": 118, + "forward_reads": 110, + "reverse_reads": 111, "sv_len": null, "gene_id": "Rv3919c", "gene_name": "gid", @@ -604,12 +601,12 @@ "pos": 7362, "ref": "G", "alt": "C", - "depth": 210, - "freq": 0.9952380952380953, + "depth": 181, + "freq": 0.994475138121547, "sv": false, "filter": "pass", - "forward_reads": 111, - "reverse_reads": 98, + "forward_reads": 109, + "reverse_reads": 71, "sv_len": null, "gene_id": "Rv0006", "gene_name": "gyrA", @@ -621,7 +618,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "levofloxacin", + "drug": "moxifloxacin", "original_mutation": "p.Glu21Gln", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -629,7 +626,7 @@ }, { "type": "who_confidence", - "drug": "moxifloxacin", + "drug": "levofloxacin", "original_mutation": "p.Glu21Gln", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -676,11 +673,11 @@ "pos": 7585, "ref": "G", "alt": "C", - "depth": 219, + "depth": 212, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 113, + "forward_reads": 106, "reverse_reads": 106, "sv_len": null, "gene_id": "Rv0006", @@ -693,7 +690,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "levofloxacin", + "drug": "moxifloxacin", "original_mutation": "p.Ser95Thr", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -701,7 +698,7 @@ }, { "type": "who_confidence", - "drug": "moxifloxacin", + "drug": "levofloxacin", "original_mutation": "p.Ser95Thr", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -748,12 +745,12 @@ "pos": 9304, "ref": "G", "alt": "A", - "depth": 228, + "depth": 221, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 116, - "reverse_reads": 112, + "forward_reads": 113, + "reverse_reads": 108, "sv_len": null, "gene_id": "Rv0006", "gene_name": "gyrA", @@ -765,7 +762,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "levofloxacin", + "drug": "moxifloxacin", "original_mutation": "p.Gly668Asp", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -773,7 +770,7 @@ }, { "type": "who_confidence", - "drug": "moxifloxacin", + "drug": "levofloxacin", "original_mutation": "p.Gly668Asp", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -820,12 +817,12 @@ "pos": 491742, "ref": "T", "alt": "C", - "depth": 153, + "depth": 149, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 98, - "reverse_reads": 55, + "forward_reads": 96, + "reverse_reads": 53, "sv_len": null, "gene_id": "Rv0407", "gene_name": "fgd1", @@ -837,17 +834,17 @@ "annotation": [ { "type": "who_confidence", - "drug": "delamanid", + "drug": "clofazimine", "original_mutation": "c.960T>C", - "confidence": "Not assoc w R - Interim", + "confidence": "Not assoc w R", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "clofazimine", + "drug": "delamanid", "original_mutation": "c.960T>C", - "confidence": "Not assoc w R", + "confidence": "Not assoc w R - Interim", "source": "WHO catalogue v2", "comment": "" } @@ -892,12 +889,12 @@ "pos": 575907, "ref": "C", "alt": "T", - "depth": 256, + "depth": 252, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 138, - "reverse_reads": 118, + "forward_reads": 137, + "reverse_reads": 115, "sv_len": null, "gene_id": "Rv0486", "gene_name": "mshA", @@ -909,7 +906,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "isoniazid", + "drug": "ethionamide", "original_mutation": "p.Ala187Val", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -917,7 +914,7 @@ }, { "type": "who_confidence", - "drug": "ethionamide", + "drug": "isoniazid", "original_mutation": "p.Ala187Val", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -935,7 +932,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "isoniazid", + "drug": "ethionamide", "original_mutation": "p.Ala187Val", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -943,7 +940,7 @@ }, { "type": "who_confidence", - "drug": "ethionamide", + "drug": "isoniazid", "original_mutation": "p.Ala187Val", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -963,12 +960,12 @@ "pos": 620625, "ref": "A", "alt": "G", - "depth": 189, + "depth": 186, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 74, - "reverse_reads": 115, + "forward_reads": 72, + "reverse_reads": 114, "sv_len": null, "gene_id": "Rv0529", "gene_name": "ccsA", @@ -980,7 +977,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "capreomycin", + "drug": "amikacin", "original_mutation": "p.Ile245Met", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -988,7 +985,7 @@ }, { "type": "who_confidence", - "drug": "amikacin", + "drug": "capreomycin", "original_mutation": "p.Ile245Met", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1014,23 +1011,23 @@ "annotation": [ { "type": "who_confidence", - "drug": "capreomycin", + "drug": "kanamycin", "original_mutation": "p.Ile245Met", - "confidence": "Not assoc w R", + "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "kanamycin", + "drug": "amikacin", "original_mutation": "p.Ile245Met", - "confidence": "Uncertain significance", + "confidence": "Not assoc w R", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "amikacin", + "drug": "capreomycin", "original_mutation": "p.Ile245Met", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1051,12 +1048,12 @@ "pos": 657081, "ref": "C", "alt": "T", - "depth": 189, + "depth": 184, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 91, - "reverse_reads": 98, + "forward_reads": 89, + "reverse_reads": 95, "sv_len": null, "gene_id": "Rv0565c", "gene_name": "Rv0565c", @@ -1105,12 +1102,12 @@ "pos": 657142, "ref": "C", "alt": "T", - "depth": 203, + "depth": 198, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 120, - "reverse_reads": 83, + "forward_reads": 117, + "reverse_reads": 81, "sv_len": null, "gene_id": "Rv0565c", "gene_name": "Rv0565c", @@ -1159,11 +1156,11 @@ "pos": 763031, "ref": "T", "alt": "C", - "depth": 216, + "depth": 215, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 109, + "forward_reads": 108, "reverse_reads": 107, "sv_len": null, "gene_id": "Rv0667", @@ -1222,12 +1219,12 @@ "pos": 775639, "ref": "T", "alt": "C", - "depth": 211, + "depth": 207, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 102, - "reverse_reads": 109, + "forward_reads": 100, + "reverse_reads": 107, "sv_len": null, "gene_id": "Rv0676c", "gene_name": "mmpL5", @@ -1293,12 +1290,12 @@ "pos": 776100, "ref": "G", "alt": "A", - "depth": 205, + "depth": 198, "freq": 1.0, "sv": false, "filter": "pass", "forward_reads": 87, - "reverse_reads": 118, + "reverse_reads": 111, "sv_len": null, "gene_id": "Rv0676c", "gene_name": "mmpL5", @@ -1364,12 +1361,12 @@ "pos": 776182, "ref": "C", "alt": "T", - "depth": 160, + "depth": 157, "freq": 1.0, "sv": false, "filter": "pass", "forward_reads": 78, - "reverse_reads": 82, + "reverse_reads": 79, "sv_len": null, "gene_id": "Rv0676c", "gene_name": "mmpL5", @@ -1435,12 +1432,12 @@ "pos": 779615, "ref": "G", "alt": "C", - "depth": 200, + "depth": 195, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 112, - "reverse_reads": 88, + "forward_reads": 109, + "reverse_reads": 86, "sv_len": null, "gene_id": "Rv0677c", "gene_name": "mmpS5", @@ -1472,12 +1469,12 @@ "pos": 781395, "ref": "T", "alt": "C", - "depth": 228, + "depth": 224, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 100, - "reverse_reads": 128, + "forward_reads": 97, + "reverse_reads": 127, "sv_len": null, "gene_id": "Rv0682", "gene_name": "rpsL", @@ -1543,7 +1540,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "isoniazid", + "drug": "moxifloxacin", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1551,7 +1548,7 @@ }, { "type": "who_confidence", - "drug": "levofloxacin", + "drug": "rifampicin", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1559,7 +1556,7 @@ }, { "type": "who_confidence", - "drug": "rifampicin", + "drug": "isoniazid", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1567,7 +1564,7 @@ }, { "type": "who_confidence", - "drug": "moxifloxacin", + "drug": "levofloxacin", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1585,7 +1582,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "isoniazid", + "drug": "levofloxacin", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1601,7 +1598,7 @@ }, { "type": "who_confidence", - "drug": "levofloxacin", + "drug": "moxifloxacin", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1609,7 +1606,7 @@ }, { "type": "who_confidence", - "drug": "moxifloxacin", + "drug": "isoniazid", "original_mutation": "c.-28T>C", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1631,11 +1628,11 @@ "pos": 1406760, "ref": "T", "alt": "TG", - "depth": 195, + "depth": 193, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 107, + "forward_reads": 105, "reverse_reads": 88, "sv_len": null, "gene_id": "Rv1258c", @@ -1648,15 +1645,15 @@ "annotation": [ { "type": "who_confidence", - "drug": "streptomycin", - "original_mutation": "LoF", + "drug": "pyrazinamide", + "original_mutation": "p.Glu194fs", "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "isoniazid", + "drug": "streptomycin", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -1664,7 +1661,7 @@ }, { "type": "who_confidence", - "drug": "pyrazinamide", + "drug": "isoniazid", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -1682,7 +1679,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "pyrazinamide", + "drug": "isoniazid", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -1690,15 +1687,15 @@ }, { "type": "who_confidence", - "drug": "isoniazid", - "original_mutation": "LoF", + "drug": "pyrazinamide", + "original_mutation": "p.Glu194fs", "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "streptomycin", + "drug": "pyrazinamide", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -1706,7 +1703,7 @@ }, { "type": "who_confidence", - "drug": "isoniazid", + "drug": "streptomycin", "original_mutation": "p.Glu194fs", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1714,15 +1711,15 @@ }, { "type": "who_confidence", - "drug": "pyrazinamide", - "original_mutation": "p.Glu194fs", + "drug": "streptomycin", + "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "streptomycin", + "drug": "isoniazid", "original_mutation": "p.Glu194fs", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -1738,179 +1735,17 @@ "pyrazinamide" ] }, - { - "chrom": "NC_000962.3", - "pos": 1416222, - "ref": "A", - "alt": "G", - "depth": 311, - "freq": 0.11254019292604502, - "sv": false, - "filter": "pass", - "forward_reads": 20, - "reverse_reads": 15, - "sv_len": null, - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "change": "p.Phe376Leu", - "nucleotide_change": "c.1126T>C", - "protein_change": "p.Phe376Leu", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Phe376Leu", - "confidence": "Not assoc w R", - "source": "WHO catalogue v2", - "comment": "" - } - ], - "consequences": [ - { - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "nucleotide_change": "c.1126T>C", - "protein_change": "p.Phe376Leu", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Phe376Leu", - "confidence": "Not assoc w R", - "source": "WHO catalogue v2", - "comment": "" - } - ] - } - ], - "locus_tag": "Rv1267c", - "gene_associated_drugs": [ - "ethambutol" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 1416232, - "ref": "ACA", - "alt": "GCC", - "depth": 311, - "freq": 0.12218649517684887, - "sv": false, - "filter": "pass", - "forward_reads": 20, - "reverse_reads": 18, - "sv_len": null, - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "change": "p.Cys372Gly", - "nucleotide_change": "c.1114_1116delTGTinsGGC", - "protein_change": "p.Cys372Gly", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Cys372Gly", - "confidence": "Not assoc w R", - "source": "WHO catalogue v2", - "comment": "" - } - ], - "consequences": [ - { - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "nucleotide_change": "c.1114_1116delTGTinsGGC", - "protein_change": "p.Cys372Gly", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Cys372Gly", - "confidence": "Not assoc w R", - "source": "WHO catalogue v2", - "comment": "" - } - ] - } - ], - "locus_tag": "Rv1267c", - "gene_associated_drugs": [ - "ethambutol" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 1416232, - "ref": "ACA", - "alt": "TCT", - "depth": 311, - "freq": 0.12218649517684887, - "sv": false, - "filter": "pass", - "forward_reads": 20, - "reverse_reads": 18, - "sv_len": null, - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "change": "p.Cys372Arg", - "nucleotide_change": "c.1114_1116delTGTinsAGA", - "protein_change": "p.Cys372Arg", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Cys372Arg", - "confidence": "Uncertain significance", - "source": "WHO catalogue v2", - "comment": "" - } - ], - "consequences": [ - { - "gene_id": "Rv1267c", - "gene_name": "embR", - "feature_id": "CCP44023", - "type": "missense_variant", - "nucleotide_change": "c.1114_1116delTGTinsAGA", - "protein_change": "p.Cys372Arg", - "annotation": [ - { - "type": "who_confidence", - "drug": "ethambutol", - "original_mutation": "p.Cys372Arg", - "confidence": "Uncertain significance", - "source": "WHO catalogue v2", - "comment": "" - } - ] - } - ], - "locus_tag": "Rv1267c", - "gene_associated_drugs": [ - "ethambutol" - ] - }, { "chrom": "NC_000962.3", "pos": 1471659, "ref": "C", "alt": "T", - "depth": 143, + "depth": 142, "freq": 1.0, "sv": false, "filter": "pass", "forward_reads": 74, - "reverse_reads": 69, + "reverse_reads": 68, "sv_len": null, "gene_id": "EBG00000313325", "gene_name": "rrs", @@ -1944,11 +1779,11 @@ "pos": 1834177, "ref": "A", "alt": "C", - "depth": 257, - "freq": 0.9922178988326849, + "depth": 246, + "freq": 0.991869918699187, "sv": false, "filter": "pass", - "forward_reads": 111, + "forward_reads": 100, "reverse_reads": 144, "sv_len": null, "gene_id": "Rv1630", @@ -1998,12 +1833,12 @@ "pos": 1854300, "ref": "T", "alt": "C", - "depth": 170, - "freq": 0.9941176470588236, + "depth": 128, + "freq": 0.9921875, "sv": false, "filter": "pass", - "forward_reads": 65, - "reverse_reads": 104, + "forward_reads": 27, + "reverse_reads": 100, "sv_len": null, "gene_id": "Rv1644", "gene_name": "tsnR", @@ -2052,12 +1887,12 @@ "pos": 1917972, "ref": "A", "alt": "G", - "depth": 174, + "depth": 166, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 105, - "reverse_reads": 69, + "forward_reads": 102, + "reverse_reads": 64, "sv_len": null, "gene_id": "Rv1694", "gene_name": "tlyA", @@ -2106,12 +1941,12 @@ "pos": 1931179, "ref": "C", "alt": "A", - "depth": 120, + "depth": 108, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 64, - "reverse_reads": 56, + "forward_reads": 62, + "reverse_reads": 46, "sv_len": null, "gene_id": "Rv1704c", "gene_name": "cycA", @@ -2142,12 +1977,12 @@ "pos": 2154724, "ref": "C", "alt": "A", - "depth": 215, + "depth": 212, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 100, - "reverse_reads": 115, + "forward_reads": 99, + "reverse_reads": 113, "sv_len": null, "gene_id": "Rv1908c", "gene_name": "katG", @@ -2196,11 +2031,11 @@ "pos": 2167926, "ref": "A", "alt": "G", - "depth": 144, + "depth": 142, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 73, + "forward_reads": 71, "reverse_reads": 71, "sv_len": null, "gene_id": "Rv1918c", @@ -2250,12 +2085,12 @@ "pos": 2223293, "ref": "T", "alt": "C", - "depth": 166, + "depth": 163, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 88, - "reverse_reads": 78, + "forward_reads": 87, + "reverse_reads": 76, "sv_len": null, "gene_id": "Rv1979c", "gene_name": "Rv1979c", @@ -2321,12 +2156,12 @@ "pos": 2714526, "ref": "GGT", "alt": "G", - "depth": 205, + "depth": 196, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 107, - "reverse_reads": 98, + "forward_reads": 103, + "reverse_reads": 93, "sv_len": null, "gene_id": "Rv2416c", "gene_name": "eis", @@ -2339,7 +2174,7 @@ { "type": "who_confidence", "drug": "amikacin", - "original_mutation": "p.Thr269fs", + "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "Abrogates effect of genetically linked AwR and AwRI eis mutations" @@ -2347,7 +2182,7 @@ { "type": "who_confidence", "drug": "kanamycin", - "original_mutation": "LoF", + "original_mutation": "p.Thr269fs", "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "Abrogates effect of genetically linked AwR and AwRI eis mutations" @@ -2364,7 +2199,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "amikacin", + "drug": "kanamycin", "original_mutation": "p.Thr269fs", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -2372,7 +2207,7 @@ }, { "type": "who_confidence", - "drug": "kanamycin", + "drug": "amikacin", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -2380,7 +2215,7 @@ }, { "type": "who_confidence", - "drug": "kanamycin", + "drug": "amikacin", "original_mutation": "p.Thr269fs", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -2388,7 +2223,7 @@ }, { "type": "who_confidence", - "drug": "amikacin", + "drug": "kanamycin", "original_mutation": "LoF", "confidence": "Uncertain significance", "source": "WHO catalogue v2", @@ -2405,266 +2240,14 @@ }, { "chrom": "NC_000962.3", - "pos": 2784204, - "ref": "T", - "alt": "G", - "depth": 49, - "freq": 0.2857142857142857, - "sv": false, - "filter": "pass", - "forward_reads": 7, - "reverse_reads": 7, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-162A>C", - "nucleotide_change": "c.-162A>C", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-162A>C", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 2784211, - "ref": "TC", - "alt": "CC", - "depth": 45, - "freq": 0.2, - "sv": false, - "filter": "pass", - "forward_reads": 3, - "reverse_reads": 6, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-169A>G", - "nucleotide_change": "c.-169A>G", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-169A>G", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 2784211, - "ref": "TC", - "alt": "CG", - "depth": 45, - "freq": 0.2, - "sv": false, - "filter": "pass", - "forward_reads": 3, - "reverse_reads": 6, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-170_-169delGAinsCG", - "nucleotide_change": "c.-170_-169delGAinsCG", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-170_-169delGAinsCG", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 2784211, - "ref": "TC", - "alt": "GC", - "depth": 45, - "freq": 0.2, - "sv": false, - "filter": "pass", - "forward_reads": 3, - "reverse_reads": 6, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-169A>C", - "nucleotide_change": "c.-169A>C", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-169A>C", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 2784211, - "ref": "TC", - "alt": "GG", - "depth": 45, - "freq": 0.2, - "sv": false, - "filter": "pass", - "forward_reads": 3, - "reverse_reads": 6, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-170_-169delGAinsCC", - "nucleotide_change": "c.-170_-169delGAinsCC", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-170_-169delGAinsCC", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 2784211, - "ref": "TC", - "alt": "TG", - "depth": 45, - "freq": 0.2, - "sv": false, - "filter": "pass", - "forward_reads": 3, - "reverse_reads": 6, - "sv_len": null, - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "change": "c.-170G>C", - "nucleotide_change": "c.-170G>C", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv2477c", - "gene_name": "Rv2477c", - "feature_id": "CCP45271", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-170G>C", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv2477c", - "gene_associated_drugs": [ - "kanamycin", - "rifampicin", - "ethambutol", - "streptomycin", - "amikacin", - "moxifloxacin", - "levofloxacin" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 3086788, + "pos": 3086788, "ref": "T", "alt": "C", - "depth": 171, + "depth": 168, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 72, + "forward_reads": 69, "reverse_reads": 99, "sv_len": null, "gene_id": "Rv2780", @@ -2696,11 +2279,11 @@ "pos": 3612813, "ref": "T", "alt": "C", - "depth": 119, + "depth": 118, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 57, + "forward_reads": 56, "reverse_reads": 62, "sv_len": null, "gene_id": "Rv3236c", @@ -2750,11 +2333,11 @@ "pos": 3625065, "ref": "T", "alt": "G", - "depth": 129, + "depth": 128, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 73, + "forward_reads": 72, "reverse_reads": 56, "sv_len": null, "gene_id": "Rv3245c", @@ -2767,17 +2350,17 @@ "annotation": [ { "type": "who_confidence", - "drug": "bedaquiline", + "drug": "rifampicin", "original_mutation": "p.Met517Leu", - "confidence": "Uncertain significance", + "confidence": "Not assoc w R", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "rifampicin", + "drug": "bedaquiline", "original_mutation": "p.Met517Leu", - "confidence": "Not assoc w R", + "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" } @@ -2830,12 +2413,12 @@ "pos": 3626562, "ref": "G", "alt": "A", - "depth": 239, - "freq": 0.99581589958159, + "depth": 232, + "freq": 0.9956896551724138, "sv": false, "filter": "pass", - "forward_reads": 111, - "reverse_reads": 127, + "forward_reads": 106, + "reverse_reads": 125, "sv_len": null, "gene_id": "Rv3245c", "gene_name": "mtrB", @@ -2847,17 +2430,17 @@ "annotation": [ { "type": "who_confidence", - "drug": "bedaquiline", + "drug": "rifampicin", "original_mutation": "p.Pro18Ser", - "confidence": "Uncertain significance", + "confidence": "Not assoc w R", "source": "WHO catalogue v2", "comment": "" }, { "type": "who_confidence", - "drug": "rifampicin", + "drug": "bedaquiline", "original_mutation": "p.Pro18Ser", - "confidence": "Not assoc w R", + "confidence": "Uncertain significance", "source": "WHO catalogue v2", "comment": "" } @@ -2896,53 +2479,17 @@ "bedaquiline" ] }, - { - "chrom": "NC_000962.3", - "pos": 4240413, - "ref": "T", - "alt": "G", - "depth": 135, - "freq": 0.18518518518518517, - "sv": false, - "filter": "pass", - "forward_reads": 20, - "reverse_reads": 5, - "sv_len": null, - "gene_id": "Rv3793", - "gene_name": "embC", - "feature_id": "CCP46622", - "type": "missense_variant", - "change": "p.Leu184Arg", - "nucleotide_change": "c.551T>G", - "protein_change": "p.Leu184Arg", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3793", - "gene_name": "embC", - "feature_id": "CCP46622", - "type": "missense_variant", - "nucleotide_change": "c.551T>G", - "protein_change": "p.Leu184Arg", - "annotation": [] - } - ], - "locus_tag": "Rv3793", - "gene_associated_drugs": [ - "ethambutol" - ] - }, { "chrom": "NC_000962.3", "pos": 4242643, "ref": "C", "alt": "T", - "depth": 175, + "depth": 158, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 85, - "reverse_reads": 90, + "forward_reads": 83, + "reverse_reads": 75, "sv_len": null, "gene_id": "Rv3793", "gene_name": "embC", @@ -3000,12 +2547,12 @@ "pos": 4243460, "ref": "C", "alt": "T", - "depth": 183, + "depth": 177, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 65, - "reverse_reads": 118, + "forward_reads": 64, + "reverse_reads": 113, "sv_len": null, "gene_id": "Rv3794", "gene_name": "embA", @@ -3054,12 +2601,12 @@ "pos": 4247028, "ref": "T", "alt": "G", - "depth": 127, - "freq": 0.2677165354330709, + "depth": 86, + "freq": 0.16279069767441862, "sv": false, "filter": "pass", - "forward_reads": 17, - "reverse_reads": 17, + "forward_reads": 8, + "reverse_reads": 6, "sv_len": null, "gene_id": "Rv3795", "gene_name": "embB", @@ -3090,12 +2637,12 @@ "pos": 4267647, "ref": "T", "alt": "C", - "depth": 131, + "depth": 125, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 71, - "reverse_reads": 60, + "forward_reads": 70, + "reverse_reads": 55, "sv_len": null, "gene_id": "Rv3805c", "gene_name": "aftB", @@ -3144,12 +2691,12 @@ "pos": 4338595, "ref": "GC", "alt": "G", - "depth": 228, - "freq": 0.9956140350877193, + "depth": 224, + "freq": 0.9955357142857143, "sv": false, "filter": "pass", - "forward_reads": 95, - "reverse_reads": 132, + "forward_reads": 92, + "reverse_reads": 131, "sv_len": null, "gene_id": "Rv3862c", "gene_name": "whiB6", @@ -3161,7 +2708,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "capreomycin", + "drug": "amikacin", "original_mutation": "c.-75delG", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -3169,7 +2716,7 @@ }, { "type": "who_confidence", - "drug": "amikacin", + "drug": "capreomycin", "original_mutation": "c.-75delG", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -3195,7 +2742,7 @@ "annotation": [ { "type": "who_confidence", - "drug": "capreomycin", + "drug": "amikacin", "original_mutation": "c.-75delG", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -3211,7 +2758,7 @@ }, { "type": "who_confidence", - "drug": "amikacin", + "drug": "capreomycin", "original_mutation": "c.-75delG", "confidence": "Not assoc w R", "source": "WHO catalogue v2", @@ -3232,11 +2779,11 @@ "pos": 4338732, "ref": "G", "alt": "A", - "depth": 193, + "depth": 192, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 92, + "forward_reads": 91, "reverse_reads": 101, "sv_len": null, "gene_id": "Rv3862c", @@ -3270,12 +2817,12 @@ "pos": 4407588, "ref": "T", "alt": "C", - "depth": 243, + "depth": 233, "freq": 1.0, "sv": false, "filter": "pass", - "forward_reads": 120, - "reverse_reads": 123, + "forward_reads": 112, + "reverse_reads": 121, "sv_len": null, "gene_id": "Rv3919c", "gene_name": "gid", @@ -3324,12 +2871,12 @@ "pos": 4407927, "ref": "T", "alt": "G", - "depth": 251, - "freq": 0.9960159362549801, + "depth": 247, + "freq": 0.9959514170040485, "sv": false, "filter": "pass", - "forward_reads": 114, - "reverse_reads": 136, + "forward_reads": 111, + "reverse_reads": 135, "sv_len": null, "gene_id": "Rv3919c", "gene_name": "gid", @@ -3380,12 +2927,12 @@ "pos": 7296, "ref": "G", "alt": "T", - "depth": 172, - "freq": 0.12790697674418605, + "depth": 160, + "freq": 0.1125, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 22, + "reverse_reads": 18, "sv_len": null, "gene_id": "Rv0006", "gene_name": "gyrA", @@ -3418,11 +2965,11 @@ "pos": 9653, "ref": "C", "alt": "A", - "depth": 187, - "freq": 0.22459893048128343, + "depth": 160, + "freq": 0.1625, "sv": false, "filter": "soft_fail", - "forward_reads": 42, + "forward_reads": 26, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv0006", @@ -3456,11 +3003,11 @@ "pos": 9675, "ref": "C", "alt": "A", - "depth": 154, - "freq": 0.11688311688311688, + "depth": 139, + "freq": 0.11510791366906475, "sv": false, "filter": "soft_fail", - "forward_reads": 18, + "forward_reads": 16, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv0006", @@ -3491,32 +3038,32 @@ }, { "chrom": "NC_000962.3", - "pos": 576628, - "ref": "G", + "pos": 576626, + "ref": "A", "alt": "C", - "depth": 125, - "freq": 0.12, + "depth": 79, + "freq": 0.11392405063291139, "sv": false, "filter": "soft_fail", - "forward_reads": 15, + "forward_reads": 9, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv0486", "gene_name": "mshA", "feature_id": "CCP43220", - "type": "synonymous_variant", - "change": "c.1281G>C", - "nucleotide_change": "c.1281G>C", - "protein_change": "p.Thr427Thr", + "type": "missense_variant", + "change": "p.Thr427Pro", + "nucleotide_change": "c.1279A>C", + "protein_change": "p.Thr427Pro", "annotation": [], "consequences": [ { "gene_id": "Rv0486", "gene_name": "mshA", "feature_id": "CCP43220", - "type": "synonymous_variant", - "nucleotide_change": "c.1281G>C", - "protein_change": "p.Thr427Thr", + "type": "missense_variant", + "nucleotide_change": "c.1279A>C", + "protein_change": "p.Thr427Pro", "annotation": [] } ], @@ -3531,11 +3078,11 @@ "pos": 576631, "ref": "C", "alt": "A", - "depth": 127, - "freq": 0.12598425196850394, + "depth": 83, + "freq": 0.13253012048192772, "sv": false, "filter": "soft_fail", - "forward_reads": 16, + "forward_reads": 11, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv0486", @@ -3565,310 +3112,352 @@ }, { "chrom": "NC_000962.3", - "pos": 761143, - "ref": "A", + "pos": 2170086, + "ref": "G", "alt": "C", - "depth": 178, - "freq": 0.12359550561797752, + "depth": 44, + "freq": 0.11363636363636363, "sv": false, "filter": "soft_fail", - "forward_reads": 1, - "reverse_reads": 21, + "forward_reads": 5, + "reverse_reads": 0, "sv_len": null, - "gene_id": "Rv0667", - "gene_name": "rpoB", - "feature_id": "CCP43410", + "gene_id": "Rv1918c", + "gene_name": "PPE35", + "feature_id": "CCP44685", "type": "missense_variant", - "change": "p.Lys446Thr", - "nucleotide_change": "c.1337A>C", - "protein_change": "p.Lys446Thr", - "annotation": [ - { - "type": "drug_resistance", - "drug": "rifampicin", - "original_mutation": "RRDR non-silent", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" - } - ], + "change": "p.Ala176Gly", + "nucleotide_change": "c.527C>G", + "protein_change": "p.Ala176Gly", + "annotation": [], "consequences": [ { - "gene_id": "Rv0667", - "gene_name": "rpoB", - "feature_id": "CCP43410", + "gene_id": "Rv1918c", + "gene_name": "PPE35", + "feature_id": "CCP44685", "type": "missense_variant", - "nucleotide_change": "c.1337A>C", - "protein_change": "p.Lys446Thr", - "annotation": [ - { - "type": "drug_resistance", - "drug": "rifampicin", - "original_mutation": "RRDR non-silent", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" - }, - { - "type": "drug_resistance", - "drug": "rifampicin", - "original_mutation": "p.Lys446Thr", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "" - } - ] + "nucleotide_change": "c.527C>G", + "protein_change": "p.Ala176Gly", + "annotation": [] } ], - "drugs": [ + "locus_tag": "Rv1918c", + "gene_associated_drugs": [ + "pyrazinamide" + ] + }, + { + "chrom": "NC_000962.3", + "pos": 2784181, + "ref": "G", + "alt": "T", + "depth": 38, + "freq": 0.15789473684210525, + "sv": false, + "filter": "soft_fail", + "forward_reads": 0, + "reverse_reads": 6, + "sv_len": null, + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-139C>A", + "nucleotide_change": "c.-139C>A", + "protein_change": "", + "annotation": [], + "consequences": [ { - "type": "drug_resistance", - "drug": "rifampicin", - "original_mutation": "RRDR non-silent", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Expert rule: Non-silent variants in RRDR of rpoB" + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-139C>A", + "protein_change": "", + "annotation": [] } ], - "locus_tag": "Rv0667", + "locus_tag": "Rv2477c", "gene_associated_drugs": [ - "rifampicin" + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" ] }, { "chrom": "NC_000962.3", - "pos": 764546, - "ref": "G", - "alt": "C", - "depth": 147, - "freq": 0.14285714285714285, + "pos": 2784195, + "ref": "T", + "alt": "G", + "depth": 23, + "freq": 0.13043478260869565, "sv": false, "filter": "soft_fail", - "forward_reads": 20, - "reverse_reads": 1, + "forward_reads": 1, + "reverse_reads": 2, "sv_len": null, - "gene_id": "Rv0668", - "gene_name": "rpoC", - "feature_id": "CCP43411", - "type": "missense_variant", - "change": "p.Gly393Arg", - "nucleotide_change": "c.1177G>C", - "protein_change": "p.Gly393Arg", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-153A>C", + "nucleotide_change": "c.-153A>C", + "protein_change": "", "annotation": [], "consequences": [ { - "gene_id": "Rv0668", - "gene_name": "rpoC", - "feature_id": "CCP43411", - "type": "missense_variant", - "nucleotide_change": "c.1177G>C", - "protein_change": "p.Gly393Arg", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-153A>C", + "protein_change": "", "annotation": [] } ], - "locus_tag": "Rv0668", + "locus_tag": "Rv2477c", "gene_associated_drugs": [ - "rifampicin" + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" ] }, { "chrom": "NC_000962.3", - "pos": 777898, - "ref": "C", - "alt": "A", - "depth": 173, - "freq": 0.14450867052023122, + "pos": 2784204, + "ref": "T", + "alt": "G", + "depth": 22, + "freq": 0.13636363636363635, "sv": false, "filter": "soft_fail", - "forward_reads": 25, - "reverse_reads": 0, + "forward_reads": 1, + "reverse_reads": 2, "sv_len": null, - "gene_id": "Rv0676c", - "gene_name": "mmpL5", - "feature_id": "CCP43419", - "type": "missense_variant", - "change": "p.Asp195Tyr", - "nucleotide_change": "c.583G>T", - "protein_change": "p.Asp195Tyr", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-162A>C", + "nucleotide_change": "c.-162A>C", + "protein_change": "", "annotation": [], "consequences": [ { - "gene_id": "Rv0676c", - "gene_name": "mmpL5", - "feature_id": "CCP43419", - "type": "missense_variant", - "nucleotide_change": "c.583G>T", - "protein_change": "p.Asp195Tyr", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-162A>C", + "protein_change": "", "annotation": [] } ], - "locus_tag": "Rv0676c", + "locus_tag": "Rv2477c", "gene_associated_drugs": [ - "clofazimine", - "bedaquiline" + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" ] }, { "chrom": "NC_000962.3", - "pos": 1304938, - "ref": "G", - "alt": "T", - "depth": 192, - "freq": 0.11458333333333333, + "pos": 2784211, + "ref": "TC", + "alt": "CC", + "depth": 21, + "freq": 0.14285714285714285, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 22, + "reverse_reads": 3, "sv_len": null, - "gene_id": "Rv1173", - "gene_name": "fbiC", - "feature_id": "CCP43929", - "type": "stop_gained", - "change": "p.Glu670*", - "nucleotide_change": "c.2008G>T", - "protein_change": "p.Glu670*", - "annotation": [ - { - "type": "drug_resistance", - "drug": "pretomanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" - }, - { - "type": "drug_resistance", - "drug": "delamanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" - }, + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-169A>G", + "nucleotide_change": "c.-169A>G", + "protein_change": "", + "annotation": [], + "consequences": [ { - "type": "who_confidence", - "drug": "clofazimine", - "original_mutation": "LoF", - "confidence": "Uncertain significance", - "source": "WHO catalogue v2", - "comment": "" + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-169A>G", + "protein_change": "", + "annotation": [] } ], + "locus_tag": "Rv2477c", + "gene_associated_drugs": [ + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" + ] + }, + { + "chrom": "NC_000962.3", + "pos": 2784211, + "ref": "TC", + "alt": "CG", + "depth": 21, + "freq": 0.14285714285714285, + "sv": false, + "filter": "soft_fail", + "forward_reads": 0, + "reverse_reads": 3, + "sv_len": null, + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-170_-169delGAinsCG", + "nucleotide_change": "c.-170_-169delGAinsCG", + "protein_change": "", + "annotation": [], "consequences": [ { - "gene_id": "Rv1173", - "gene_name": "fbiC", - "feature_id": "CCP43929", - "type": "stop_gained", - "nucleotide_change": "c.2008G>T", - "protein_change": "p.Glu670*", - "annotation": [ - { - "type": "who_confidence", - "drug": "clofazimine", - "original_mutation": "LoF", - "confidence": "Uncertain significance", - "source": "WHO catalogue v2", - "comment": "" - }, - { - "type": "drug_resistance", - "drug": "pretomanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" - }, - { - "type": "drug_resistance", - "drug": "delamanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" - } - ] + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-170_-169delGAinsCG", + "protein_change": "", + "annotation": [] } ], - "drugs": [ - { - "type": "drug_resistance", - "drug": "pretomanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" - }, + "locus_tag": "Rv2477c", + "gene_associated_drugs": [ + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" + ] + }, + { + "chrom": "NC_000962.3", + "pos": 2784211, + "ref": "TC", + "alt": "GC", + "depth": 21, + "freq": 0.14285714285714285, + "sv": false, + "filter": "soft_fail", + "forward_reads": 0, + "reverse_reads": 3, + "sv_len": null, + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "change": "c.-169A>C", + "nucleotide_change": "c.-169A>C", + "protein_change": "", + "annotation": [], + "consequences": [ { - "type": "drug_resistance", - "drug": "delamanid", - "original_mutation": "LoF", - "confidence": "Assoc w R - Interim", - "source": "WHO catalogue v2", - "comment": "Confers DLM-PMD cross-resistance" + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-169A>C", + "protein_change": "", + "annotation": [] } ], - "locus_tag": "Rv1173", + "locus_tag": "Rv2477c", "gene_associated_drugs": [ - "clofazimine", - "delamanid", - "pretomanid" + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" ] }, { "chrom": "NC_000962.3", - "pos": 1673558, - "ref": "A", - "alt": "C", - "depth": 135, - "freq": 0.1111111111111111, + "pos": 2784211, + "ref": "TC", + "alt": "GG", + "depth": 21, + "freq": 0.14285714285714285, "sv": false, "filter": "soft_fail", - "forward_reads": 15, - "reverse_reads": 0, + "forward_reads": 0, + "reverse_reads": 3, "sv_len": null, - "gene_id": "Rv1484", - "gene_name": "inhA", - "feature_id": "CCP44244", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", "type": "upstream_gene_variant", - "change": "c.-644A>C", - "nucleotide_change": "c.-644A>C", + "change": "c.-170_-169delGAinsCC", + "nucleotide_change": "c.-170_-169delGAinsCC", "protein_change": "", "annotation": [], "consequences": [ { - "gene_id": "Rv1484", - "gene_name": "inhA", - "feature_id": "CCP44244", + "gene_id": "Rv2477c", + "gene_name": "Rv2477c", + "feature_id": "CCP45271", "type": "upstream_gene_variant", - "nucleotide_change": "c.-644A>C", + "nucleotide_change": "c.-170_-169delGAinsCC", "protein_change": "", "annotation": [] } ], - "locus_tag": "Rv1484", + "locus_tag": "Rv2477c", "gene_associated_drugs": [ - "isoniazid", - "ethionamide" + "kanamycin", + "rifampicin", + "ethambutol", + "streptomycin", + "amikacin", + "moxifloxacin", + "levofloxacin" ] }, { "chrom": "NC_000962.3", - "pos": 2784199, - "ref": "G", - "alt": "C", - "depth": 54, - "freq": 0.14814814814814814, + "pos": 2784211, + "ref": "TC", + "alt": "TG", + "depth": 21, + "freq": 0.14285714285714285, "sv": false, "filter": "soft_fail", - "forward_reads": 8, - "reverse_reads": 0, + "forward_reads": 0, + "reverse_reads": 3, "sv_len": null, "gene_id": "Rv2477c", "gene_name": "Rv2477c", "feature_id": "CCP45271", "type": "upstream_gene_variant", - "change": "c.-157C>G", - "nucleotide_change": "c.-157C>G", + "change": "c.-170G>C", + "nucleotide_change": "c.-170G>C", "protein_change": "", "annotation": [], "consequences": [ @@ -3877,7 +3466,7 @@ "gene_name": "Rv2477c", "feature_id": "CCP45271", "type": "upstream_gene_variant", - "nucleotide_change": "c.-157C>G", + "nucleotide_change": "c.-170G>C", "protein_change": "", "annotation": [] } @@ -3940,12 +3529,12 @@ "pos": 3339726, "ref": "A", "alt": "T", - "depth": 100, - "freq": 0.14, + "depth": 56, + "freq": 0.16071428571428573, "sv": false, "filter": "soft_fail", "forward_reads": 2, - "reverse_reads": 12, + "reverse_reads": 7, "sv_len": null, "gene_id": "Rv2983", "gene_name": "fbiD", @@ -3978,12 +3567,12 @@ "pos": 3339744, "ref": "A", "alt": "T", - "depth": 42, - "freq": 0.19047619047619047, + "depth": 31, + "freq": 0.12903225806451613, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 8, + "reverse_reads": 4, "sv_len": null, "gene_id": "Rv2983", "gene_name": "fbiD", @@ -4016,12 +3605,12 @@ "pos": 3339750, "ref": "C", "alt": "G", - "depth": 63, - "freq": 0.12698412698412698, + "depth": 38, + "freq": 0.15789473684210525, "sv": false, "filter": "soft_fail", "forward_reads": 1, - "reverse_reads": 7, + "reverse_reads": 5, "sv_len": null, "gene_id": "Rv2983", "gene_name": "fbiD", @@ -4049,55 +3638,17 @@ "pretomanid" ] }, - { - "chrom": "NC_000962.3", - "pos": 3568425, - "ref": "A", - "alt": "C", - "depth": 125, - "freq": 0.144, - "sv": false, - "filter": "soft_fail", - "forward_reads": 1, - "reverse_reads": 17, - "sv_len": null, - "gene_id": "Rv3197A", - "gene_name": "whiB7", - "feature_id": "CCP46011", - "type": "synonymous_variant", - "change": "c.255T>G", - "nucleotide_change": "c.255T>G", - "protein_change": "p.Arg85Arg", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3197A", - "gene_name": "whiB7", - "feature_id": "CCP46011", - "type": "synonymous_variant", - "nucleotide_change": "c.255T>G", - "protein_change": "p.Arg85Arg", - "annotation": [] - } - ], - "locus_tag": "Rv3197A", - "gene_associated_drugs": [ - "streptomycin", - "amikacin", - "kanamycin" - ] - }, { "chrom": "NC_000962.3", "pos": 3568428, "ref": "T", "alt": "C", - "depth": 133, - "freq": 0.18796992481203006, + "depth": 87, + "freq": 0.1839080459770115, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 25, + "reverse_reads": 16, "sv_len": null, "gene_id": "Rv3197A", "gene_name": "whiB7", @@ -4130,11 +3681,11 @@ "pos": 3568473, "ref": "C", "alt": "A", - "depth": 162, - "freq": 0.12345679012345678, + "depth": 103, + "freq": 0.14563106796116504, "sv": false, "filter": "soft_fail", - "forward_reads": 20, + "forward_reads": 15, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv3197A", @@ -4168,11 +3719,11 @@ "pos": 4038955, "ref": "C", "alt": "A", - "depth": 146, - "freq": 0.1780821917808219, + "depth": 131, + "freq": 0.1450381679389313, "sv": false, "filter": "soft_fail", - "forward_reads": 26, + "forward_reads": 19, "reverse_reads": 0, "sv_len": null, "gene_id": "Rv3596c", @@ -4201,32 +3752,32 @@ }, { "chrom": "NC_000962.3", - "pos": 4040259, - "ref": "T", - "alt": "G", - "depth": 140, - "freq": 0.11428571428571428, + "pos": 4040926, + "ref": "G", + "alt": "C", + "depth": 44, + "freq": 0.11363636363636363, "sv": false, "filter": "soft_fail", - "forward_reads": 16, - "reverse_reads": 0, + "forward_reads": 0, + "reverse_reads": 5, "sv_len": null, "gene_id": "Rv3596c", "gene_name": "clpC1", "feature_id": "CCP46419", - "type": "missense_variant", - "change": "p.Glu149Ala", - "nucleotide_change": "c.446A>C", - "protein_change": "p.Glu149Ala", + "type": "upstream_gene_variant", + "change": "c.-222C>G", + "nucleotide_change": "c.-222C>G", + "protein_change": "", "annotation": [], "consequences": [ { "gene_id": "Rv3596c", "gene_name": "clpC1", "feature_id": "CCP46419", - "type": "missense_variant", - "nucleotide_change": "c.446A>C", - "protein_change": "p.Glu149Ala", + "type": "upstream_gene_variant", + "nucleotide_change": "c.-222C>G", + "protein_change": "", "annotation": [] } ], @@ -4240,12 +3791,12 @@ "pos": 4040950, "ref": "A", "alt": "T", - "depth": 34, - "freq": 0.20588235294117646, + "depth": 25, + "freq": 0.16, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 7, + "reverse_reads": 4, "sv_len": null, "gene_id": "Rv3596c", "gene_name": "clpC1", @@ -4273,176 +3824,23 @@ }, { "chrom": "NC_000962.3", - "pos": 4040961, - "ref": "T", - "alt": "G", - "depth": 38, - "freq": 0.13157894736842105, - "sv": false, - "filter": "soft_fail", - "forward_reads": 0, - "reverse_reads": 5, - "sv_len": null, - "gene_id": "Rv3596c", - "gene_name": "clpC1", - "feature_id": "CCP46419", - "type": "upstream_gene_variant", - "change": "c.-257A>C", - "nucleotide_change": "c.-257A>C", - "protein_change": "", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3596c", - "gene_name": "clpC1", - "feature_id": "CCP46419", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-257A>C", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv3596c", - "gene_associated_drugs": [ - "pyrazinamide" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 4245835, - "ref": "T", - "alt": "G", - "depth": 165, - "freq": 0.11515151515151516, - "sv": false, - "filter": "soft_fail", - "forward_reads": 17, - "reverse_reads": 2, - "sv_len": null, - "gene_id": "Rv3794", - "gene_name": "embA", - "feature_id": "CCP46623", - "type": "missense_variant", - "change": "p.Leu868Arg", - "nucleotide_change": "c.2603T>G", - "protein_change": "p.Leu868Arg", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3794", - "gene_name": "embA", - "feature_id": "CCP46623", - "type": "missense_variant", - "nucleotide_change": "c.2603T>G", - "protein_change": "p.Leu868Arg", - "annotation": [] - }, - { - "gene_id": "Rv3795", - "gene_name": "embB", - "feature_id": "CCP46624", - "type": "upstream_gene_variant", - "nucleotide_change": "c.-679T>G", - "protein_change": "", - "annotation": [] - } - ], - "locus_tag": "Rv3794", - "gene_associated_drugs": [ - "ethambutol" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 4247055, + "pos": 4247015, "ref": "T", - "alt": "A", - "depth": 129, - "freq": 0.13178294573643412, - "sv": false, - "filter": "soft_fail", - "forward_reads": 17, - "reverse_reads": 0, - "sv_len": null, - "gene_id": "Rv3795", - "gene_name": "embB", - "feature_id": "CCP46624", - "type": "missense_variant", - "change": "p.Leu181Gln", - "nucleotide_change": "c.542T>A", - "protein_change": "p.Leu181Gln", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3795", - "gene_name": "embB", - "feature_id": "CCP46624", - "type": "missense_variant", - "nucleotide_change": "c.542T>A", - "protein_change": "p.Leu181Gln", - "annotation": [] - } - ], - "locus_tag": "Rv3795", - "gene_associated_drugs": [ - "ethambutol" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 4248319, - "ref": "A", - "alt": "T", - "depth": 151, - "freq": 0.17880794701986755, - "sv": false, - "filter": "soft_fail", - "forward_reads": 2, - "reverse_reads": 25, - "sv_len": null, - "gene_id": "Rv3795", - "gene_name": "embB", - "feature_id": "CCP46624", - "type": "synonymous_variant", - "change": "c.1806A>T", - "nucleotide_change": "c.1806A>T", - "protein_change": "p.Val602Val", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3795", - "gene_name": "embB", - "feature_id": "CCP46624", - "type": "synonymous_variant", - "nucleotide_change": "c.1806A>T", - "protein_change": "p.Val602Val", - "annotation": [] - } - ], - "locus_tag": "Rv3795", - "gene_associated_drugs": [ - "ethambutol" - ] - }, - { - "chrom": "NC_000962.3", - "pos": 4248324, - "ref": "C", "alt": "G", - "depth": 170, - "freq": 0.18235294117647058, + "depth": 94, + "freq": 0.1702127659574468, "sv": false, "filter": "soft_fail", "forward_reads": 0, - "reverse_reads": 31, + "reverse_reads": 16, "sv_len": null, "gene_id": "Rv3795", "gene_name": "embB", "feature_id": "CCP46624", "type": "missense_variant", - "change": "p.Ala604Gly", - "nucleotide_change": "c.1811C>G", - "protein_change": "p.Ala604Gly", + "change": "p.Ser168Ala", + "nucleotide_change": "c.502T>G", + "protein_change": "p.Ser168Ala", "annotation": [], "consequences": [ { @@ -4450,8 +3848,8 @@ "gene_name": "embB", "feature_id": "CCP46624", "type": "missense_variant", - "nucleotide_change": "c.1811C>G", - "protein_change": "p.Ala604Gly", + "nucleotide_change": "c.502T>G", + "protein_change": "p.Ser168Ala", "annotation": [] } ], @@ -4460,52 +3858,16 @@ "ethambutol" ] }, - { - "chrom": "NC_000962.3", - "pos": 4267416, - "ref": "G", - "alt": "C", - "depth": 197, - "freq": 0.12690355329949238, - "sv": false, - "filter": "soft_fail", - "forward_reads": 25, - "reverse_reads": 0, - "sv_len": null, - "gene_id": "Rv3805c", - "gene_name": "aftB", - "feature_id": "CCP46634", - "type": "missense_variant", - "change": "p.Pro474Arg", - "nucleotide_change": "c.1421C>G", - "protein_change": "p.Pro474Arg", - "annotation": [], - "consequences": [ - { - "gene_id": "Rv3805c", - "gene_name": "aftB", - "feature_id": "CCP46634", - "type": "missense_variant", - "nucleotide_change": "c.1421C>G", - "protein_change": "p.Pro474Arg", - "annotation": [] - } - ], - "locus_tag": "Rv3805c", - "gene_associated_drugs": [ - "ethambutol" - ] - }, { "chrom": "NC_000962.3", "pos": 4338219, "ref": "G", "alt": "T", - "depth": 157, - "freq": 0.12101910828025478, + "depth": 137, + "freq": 0.11678832116788321, "sv": false, "filter": "soft_fail", - "forward_reads": 18, + "forward_reads": 15, "reverse_reads": 1, "sv_len": null, "gene_id": "Rv3862c", @@ -4539,12 +3901,12 @@ "percent_reads_mapped": 98.25, "num_reads_mapped": 5997058, "target_median_depth": 195.0, - "genome_median_depth": 189, + "genome_median_depth": 189.0, "target_qc": [ { "target": "dnaA", "percent_depth_pass": 100.0, - "median_depth": 185.5 + "median_depth": 185.0 }, { "target": "gyrB", @@ -4579,7 +3941,7 @@ { "target": "Rv0565c", "percent_depth_pass": 100.0, - "median_depth": 205.5 + "median_depth": 206.0 }, { "target": "hadA", @@ -4654,7 +4016,7 @@ { "target": "atpE", "percent_depth_pass": 100.0, - "median_depth": 165.0 + "median_depth": 164.5 }, { "target": "rrs", @@ -4679,12 +4041,12 @@ { "target": "tsnR", "percent_depth_pass": 100.0, - "median_depth": 180.0 + "median_depth": 180.5 }, { "target": "tlyA", "percent_depth_pass": 100.0, - "median_depth": 214.0 + "median_depth": 214.5 }, { "target": "cycA", @@ -4799,7 +4161,7 @@ { "target": "whiB7", "percent_depth_pass": 100.0, - "median_depth": 183.5 + "median_depth": 183.0 }, { "target": "Rv3236c", diff --git a/tests/test_cli.py b/tests/test_cli.py index e1e0ecf..e72b4dc 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -5,7 +5,12 @@ from click.testing import CliRunner -from prp.cli import annotate_delly, create_bonsai_input, create_cdm_input +from prp.cli import ( + annotate_delly, + create_bonsai_input, + create_cdm_input, + add_igv_annotation_track, +) from prp.models import PipelineResult from prp.models.base import RWModel from prp.models.phenotype import ElementType @@ -216,6 +221,41 @@ def test_annotate_delly( assert test_contents == expected_contents +def test_add_igv_annotation_track(mtuberculosis_snv_vcf_path, simple_pipeline_result): + """Test command for adding IGV annotation track to a result file.""" + runner = CliRunner() + with runner.isolated_filesystem(): + result_fname = "before_update.json" + # write fixture to file + with open(result_fname, "w") as outp: + outp.write(simple_pipeline_result.model_dump_json()) + + output_fname = "after_update.json" + args = [ + "--name", + "snv", + "--annotation-file", + mtuberculosis_snv_vcf_path, + "--result", + result_fname, + output_fname, + ] + result = runner.invoke(add_igv_annotation_track, args) + + # test successful execution of command + assert result.exit_code == 0 + + # test correct output format + with open(output_fname, "r", encoding="utf-8") as file_after: + test_file_after = json.load(file_after) + n_tracks_before = ( + 0 + if simple_pipeline_result.genome_annotation is None + else len(simple_pipeline_result.genome_annotation) + ) + assert len(test_file_after["genome_annotation"]) == n_tracks_before + 1 + + def test_create_output_mtuberculosis( mtuberculosis_analysis_meta_path, mtuberculosis_bracken_path,