diff --git a/bin/check_snpit_against_tbprofiler.py b/bin/check_snpit_against_tbprofiler.py index ce8d23a..a187b8e 100755 --- a/bin/check_snpit_against_tbprofiler.py +++ b/bin/check_snpit_against_tbprofiler.py @@ -44,10 +44,10 @@ def main(args): if snpit_results['Species'] == 'N/A': tbprofiler_report = json.load(open(args.tbprofiler_report)) - pct_reads_mapped = tbprofiler_report['qc']['pct_reads_mapped'] - if tbprofiler_report['main_lin'] == 'lineage4' and pct_reads_mapped >= args.min_percent_reads_mapped: + pct_reads_mapped = tbprofiler_report['qc']['percent_reads_mapped'] + if tbprofiler_report['main_lineage'] == 'lineage4' and pct_reads_mapped >= args.min_percent_reads_mapped: snpit_results['Species'] = 'M. tuberculosis' - snpit_results['Lineage'] = tbprofiler_report['main_lin'].replace('lineage', 'Lineage ') + snpit_results['Lineage'] = tbprofiler_report['main_lineage'].replace('lineage', 'Lineage ') snpit_results['Percentage'] = 'N/A' elif snpit_results['Percentage'] != 'N/A' and snpit_results['Percentage'] < args.min_snpit_percentage: tbprofiler_report = json.load(open(args.tbprofiler_report))