Skip to content

Commit

Permalink
update variable names used in updated report
Browse files Browse the repository at this point in the history
  • Loading branch information
taranewman committed Apr 18, 2024
1 parent 1c49f6d commit 35b5d8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/check_snpit_against_tbprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 35b5d8c

Please sign in to comment.