Skip to content

Commit

Permalink
skip scorpio in usher mode (#461)
Browse files Browse the repository at this point in the history
* skip scorpio in usher mode

* skip pytests because they can't run the fast mode for lack of memory on the ubuntu actions, and the non-scorpio mode with usher no longer will give 'delta' constellations out
  • Loading branch information
aineniamh authored Jun 14, 2022
1 parent bafc1d8 commit 5071a18
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pangolin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
run: pangolin --analysis-mode usher pangolin/test/test_seqs.fasta 2>&1 | tee pangolin_usher.log
- name: Run pangolin accurate with test data
run: pangolin --analysis-mode accurate pangolin/test/test_seqs.fasta 2>&1 | tee pangolin_accurate.log
- name: Install and run pytest
run: mamba install -y pytest && python -m pytest tests/
- name: Run pangolin with outdir and outfile
run: pangolin pangolin/test/test_seqs.fasta -o my_test --outfile pangolin_out.txt 2>&1 | tee pangolin_outdir_outfile.log
- name: Run pangolin with out alignment
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pangolin_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
run: pangolin --analysis-mode fast pangolin/test/test_seqs.fasta 2>&1 | tee pangolin_fast.log
- name: Run pangolin accurate with test data
run: pangolin --analysis-mode accurate pangolin/test/test_seqs.fasta 2>&1 | tee pangolin_accurate.log
- name: Install and run pytest
run: mamba install -y pytest && python -m pytest tests/
- name: Run pangolin with outdir and outfile
run: pangolin pangolin/test/test_seqs.fasta -o my_test --outfile pangolin_out.txt 2>&1 | tee pangolin_outdir_outfile.log
- name: Run pangolin with out alignment
Expand Down
4 changes: 2 additions & 2 deletions pangolin/scripts/preprocessing.smk
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rule scorpio:
log:
os.path.join(config[KEY_TEMPDIR], "logs/scorpio.log")
run:
if params.skip_scorpio:
if params.skip_scorpio or config[KEY_ANALYSIS_MODE] == "usher":
shell("touch {output.report:q}")
else:
shell("scorpio classify \
Expand All @@ -106,7 +106,7 @@ rule get_constellations:
output:
list = os.path.join(config[KEY_TEMPDIR], "get_constellations.txt")
run:
if params.skip_scorpio:
if params.skip_scorpio or config[KEY_ANALYSIS_MODE] == "usher":
shell("touch {output.list:q}")
else:
shell("scorpio list \
Expand Down
Binary file added pangolin/test/test_seqs.fasta.xz
Binary file not shown.
14 changes: 10 additions & 4 deletions tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

def test_cmd_line(tmp_path):
query_file = TEST_DIR / 'test-data' / 'sequence1.fasta'
output_file = tmp_path / 'out.csv'
args = ['--outfile', str(output_file), str(query_file)]
output_file = TEST_DIR / 'out.csv'
args = ['--outfile', str(output_file),
'--analysis-mode', 'fast',
str(query_file)
]
command.main(sysargs=args)
results = open(output_file).read()
assert 'Delta (B.1.617.2-like)' in results
Expand All @@ -19,9 +22,12 @@ def test_cmd_line_partial_datadir(tmp_path):
query_file = test_data_dir / 'sequence1.fasta'
datadir = test_data_dir / 'datadir1'

output_file = tmp_path / 'out.csv'
output_file = TEST_DIR / 'out.csv'
args = ['--outfile', str(output_file),
'--datadir', str(datadir), str(query_file)]
'--datadir', str(datadir),
'--analysis-mode', 'fast',
str(query_file)
]
command.main(sysargs=args)
results = open(output_file).read()
assert 'Delta (B.1.617.2-like-with-bells)' in results

0 comments on commit 5071a18

Please sign in to comment.