diff --git a/genome_grist/conf/Snakefile b/genome_grist/conf/Snakefile index c68921d..d6760ee 100755 --- a/genome_grist/conf/Snakefile +++ b/genome_grist/conf/Snakefile @@ -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) @@ -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] diff --git a/tests/test-data/GCF_000020205-is-missing.trim.sig.zip b/tests/test-data/GCF_000020205-is-missing.trim.sig.zip index 141a601..e7e89ee 100644 Binary files a/tests/test-data/GCF_000020205-is-missing.trim.sig.zip and b/tests/test-data/GCF_000020205-is-missing.trim.sig.zip differ diff --git a/tests/test-data/conf-missing-skip.yml b/tests/test-data/conf-missing-skip.yml index 99c77bb..4e8ebb5 100644 --- a/tests/test-data/conf-missing-skip.yml +++ b/tests/test-data/conf-missing-skip.yml @@ -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 diff --git a/tests/test-data/conf-missing.yml b/tests/test-data/conf-missing.yml index c8433e1..9fcb1e5 100644 --- a/tests/test-data/conf-missing.yml +++ b/tests/test-data/conf-missing.yml @@ -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 diff --git a/tests/test_snakemake_errors.py b/tests/test_snakemake_errors.py index 8e2a00b..530296e 100644 --- a/tests/test_snakemake_errors.py +++ b/tests/test_snakemake_errors.py @@ -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: