Skip to content

Commit

Permalink
add picklists into the config (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Jan 15, 2022
1 parent d4666fd commit 28ea610
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions conf-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ private_databases_info:

taxonomies:
- databases/podar-ref.tax.csv

picklist: xyz.csv::manifest
4 changes: 3 additions & 1 deletion genome_grist/conf/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 28ea610

Please sign in to comment.