iqbal-lab / Mykrobe-predictor

Antibiotic resistance predictions in minutes on a laptop
Other
50 stars 19 forks source link

Resistance prediction for mixed isolates #153

Closed AdmiralenOla closed 5 years ago

AdmiralenOla commented 5 years ago

Dear Iqbal lab,

I have sequences from an MTB isolate which is a known 50:50 mixture between two different strains, one of which is RIF resistant due to the H455Y mutation in the rpoB gene. In the JSON results I see that the distribution between reference and alternate calls are about as expected:

            "rpoB_H445Y-CAC761139TAC": {
                "variant": "ref-H445Y?var_name=CAC761139TAC&num_alts=7&ref=NC_000962.3&enum=0&gene=rpoB&mut=H445Y",
                "genotype": [
                    0,
                    1
                ],
                "genotype_likelihoods": [
                    -88.42889600446301,
                    -22.990288375273366,
                    -72.05151775557462
                ],
                "info": {
                    "coverage": {
                        "reference": {
                            "percent_coverage": 100.0,
                            "median_depth": 24,
                            "min_non_zero_depth": 24,
                            "kmer_count": 594
                        },
                        "alternate": {
                            "percent_coverage": 100.0,
                            "median_depth": 28,
                            "min_non_zero_depth": 27,
                            "kmer_count": 677
                        }
                    },
                    "expected_depths": [
                        73
                    ],
                    "contamination_depths": [],
                    "filter": "LOW_GT_CONF",
                    "conf": 65
                },
                "_cls": "Call.VariantCall"
            },

However, this information appears to be lost after using the json_to_tsv script. There is no information to indicate there was a mixed call:

mykrobe_version file    plate_name  sample  drug    phylo_group species lineage phylo_group_per_covg    species_per_covg    lineage_per_covg    phylo_group_depth   species_depth   lineage_depth   susceptibility  variants (gene:alt_depth:wt_depth:conf) genes (prot_mut-ref_mut:percent_covg:depth)
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Amikacin    Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Capreomycin Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Ethambutol  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Isoniazid   Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Kanamycin   Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Pyrazinamide    Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Quinolones  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Rifampicin  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       
v0.5.6-0-gbd7923a-dirty mykrobe_output      susceptibility  Streptomycin    Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69  S       

Are there some settings I've not seen, is this information being filtered out in the tsv output, or is there something else I've overlooked?

Best regards, Ola Brynildsrud

iqbal-lab commented 5 years ago

Hi there @AdmiralenOla !

  1. This sounds like a bug. i will let @Phelimb comment.
  2. We are just about to kill this repo and move to this new one https://github.com/Mykrobe-tools/mykrobe. Very sorry to ask, but could you download and try the latest release there and see if you have the same problem, and if so, raise an issue there?
Phelimb commented 5 years ago

@AdmiralenOla https://github.com/Mykrobe-tools/mykrobe will also have --format tsv option which should make it easier to export to tsv. If this is replicated in v0.6 please open a new issue on that repo and I'll be sure to take a look asap.

AdmiralenOla commented 5 years ago

Hi @Phelimb, @iqbal-lab !

I've downloaded v0.6.1 from your new repository, and can confirm that this newer version does not have the same issue. Thanks! Will close this issue then.

sample  drug    susceptibility  variants (dna_variant-AA_variant:ref_kmer_count:alt_kmer_count:conf) [use --format json for more info]  genes (prot_mut-ref_mut:percent_covg:depth) [use --format json for more info]   mykrobe_version files   probe_sets  genotype_model  kmer_size   phylo_group species lineage phylo_group_per_covg    species_per_covg    lineage_per_covg    phylo_group_depth   species_depth   lineage_depth
[redacted]  Amikacin    S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Capreomycin S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Ciprofloxacin   S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Ethambutol  S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Isoniazid   S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Kanamycin   S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Moxifloxacin    S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Ofloxacin   S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Pyrazinamide    S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Rifampicin  r   rpoB_H445X-CAC761139TAC:488:571:1633        v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69
[redacted]  Streptomycin    S           v0.6.1  [redacted]L001_R1_001.fastq.gz;[redacted]L001_R2_001.fastq.gz   /opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-species-170421.fasta.gz;/opt/conda/lib/python3.6/site-packages/mykrobe/data/panels/tb-hunt-probe-set-jan-03-2019.fasta.gz kmer_count  21  Mycobacterium_tuberculosis_complex  Mycobacterium_tuberculosis  European_American   99.637  98.673  100.0   73  67.0    69