Skip to content

Commit

Permalink
Merge pull request #426 from jodyphelan/dev
Browse files Browse the repository at this point in the history
Typo #424
  • Loading branch information
jodyphelan authored Feb 20, 2025
2 parents cc79ac3 + 104a591 commit bd94ce5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
- name: Run tests
run: |
cd tests
mamba install pytest -y
mamba install pytest pandas importlib_resources -y
pytest -x .
2 changes: 1 addition & 1 deletion tbprofiler/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def process_result(self, args: argparse.Namespace, result: ProfileResult):
if var.type=='synonymous_mutation':
confidence[drug] = 'Not Assoc W R - Interim'
else:
confidence[drug] = 'Uncertain Significance'
confidence[drug] = 'Uncertain significance'
ann = {
'type':'who_confidence',
'drug':drug,
Expand Down
8 changes: 8 additions & 0 deletions tests/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ def test_collate():
O.write("por5_vcf\n")
run_cmd(f"tb-profiler collate --db {db} --samples samples.txt")
assert open("tbprofiler.txt").read() == collate_text

def test_tbp_parser():
run_cmd("git clone https://github.com/theiagen/tbp-parser.git")
run_cmd("samtools index bam/por5A_fastq.bam")
run_cmd('python tbp-parser/tbp_parser/tbp_parser.py results/por5A_freebayes.results.json bam/por5A_fastq.bam -o "example-tbp-parser" --min_depth 12 --min_frequency 0.9 --sequencing_method "Illumina NextSeq" --operator "John Doe"')
test_text = ','.join([l.strip().split(',')[:-2] for l in open("example-tbp-parser.looker_report.csv")][1])
target_text = "por5A_freebayes,Illumina NextSeq,U,S-Interim,U,U,R,R,R,U,S,U,S,R,R,U,lineage4,DNA of Mycobacterium tuberculosis species detected"
assert test_text == target_text

0 comments on commit bd94ce5

Please sign in to comment.