From 28ea61014d5d88a566ed14e4849e1b42430b7cc4 Mon Sep 17 00:00:00 2001 From: "C. Titus Brown" Date: Sat, 15 Jan 2022 05:50:56 -0800 Subject: [PATCH] add picklists into the config (#136) --- conf-private.yml | 2 ++ genome_grist/conf/Snakefile | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf-private.yml b/conf-private.yml index 69d7561..e970750 100644 --- a/conf-private.yml +++ b/conf-private.yml @@ -13,3 +13,5 @@ private_databases_info: taxonomies: - databases/podar-ref.tax.csv + +picklist: xyz.csv::manifest diff --git a/genome_grist/conf/Snakefile b/genome_grist/conf/Snakefile index 5bf165f..f4761cd 100755 --- a/genome_grist/conf/Snakefile +++ b/genome_grist/conf/Snakefile @@ -77,6 +77,7 @@ if config.get('database_taxonomy'): sys.exit(-1) TAXONOMY_DB = config.get('taxonomies', ["NO_TAXONOMIES_SPECIFIED_IN_CONFIG"]) +PICKLIST = config.get('picklist', '') # make a `sourmash sketch` -p param string. def make_param_str(ksizes, scaled): @@ -822,13 +823,14 @@ rule sourmash_prefetch_wc: ksize = SOURMASH_DB_KSIZE, moltype = f"--{SOURMASH_COMPUTE_TYPE.lower()}", threshold_bp = SOURMASH_DATABASE_THRESHOLD_BP, + picklist = f"--picklist {PICKLIST}" if PICKLIST else "" shell: """ echo "DB is {input.db}" sourmash prefetch {input.sig} {input.db} -k {params.ksize} \ --threshold-bp={params.threshold_bp} {params.moltype} \ --save-matching-hashes={output.known} \ --save-unmatched-hashes={output.unknown} \ - -o {output.csv} + {params.picklist} -o {output.csv} """ # report on known and unknown hashes