Skip to content

Commit

Permalink
[MRG] update ignore_ident code for later use too (#259)
Browse files Browse the repository at this point in the history
* update ignore_ident code for later use too

* fix, print

* add more matches to make tests work
  • Loading branch information
ctb authored Dec 7, 2022
1 parent fc3dbeb commit 936fe07
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions genome_grist/conf/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ class Checkpoint_GatherResults:
genome_idents = []
for row in load_gather_csv(gather_csv):
ident = row['name'].split()[0]

# skip identifiers we've been asked to ignore in 'skip_genomes'
if ident in IGNORE_IDENTS:
print(f"Skipping identifier '{ident}' because it is in 'skip_genomes'")
continue
genome_idents.append(ident)

Expand Down Expand Up @@ -353,6 +356,11 @@ class ListGatherGenomes(Checkpoint_GatherResults):
for row in load_csv(gather_csv):
ident = row['name'].split()[0]

# skip identifiers we've been asked to ignore in 'skip_genomes'
if ident in IGNORE_IDENTS:
print(f"Skipping identifier '{ident}' because it is in 'skip_genomes'")
continue

# if in local information, use that as genome source.
if ident in local_info:
info = local_info[ident]
Expand Down
Binary file modified tests/test-data/GCF_000020205-is-missing.trim.sig.zip
Binary file not shown.
1 change: 1 addition & 0 deletions tests/test-data/conf-missing-skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ samples:
outdir: outputs.missing
sourmash_databases:
- tests/test-data/GCF_000020205.1.sig.zip
- tests/test-data/SRR5950647.x.gtdb-rs202.matches.zip

prevent_sra_download: true

Expand Down
1 change: 1 addition & 0 deletions tests/test-data/conf-missing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ samples:
outdir: outputs.missing
sourmash_databases:
- tests/test-data/GCF_000020205.1.sig.zip
- tests/test-data/SRR5950647.x.gtdb-rs202.matches.zip

prevent_sra_download: true

Expand Down
2 changes: 1 addition & 1 deletion tests/test_snakemake_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_missing_genbank_genome_skip():
global _tempdir

conf = utils.relative_file('tests/test-data/conf-missing-skip.yml')
extra_args = ["download_genbank_genomes"]
extra_args = ["download_genbank_genomes", "retrieve_genomes"]

sigs_dir = os.path.join(_tempdir, "sigs")
try:
Expand Down

0 comments on commit 936fe07

Please sign in to comment.