Skip to content

Commit

Permalink
add index command
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Jan 14, 2020
1 parent f9ef098 commit d2e8fbc
Show file tree
Hide file tree
Showing 10 changed files with 3,998 additions and 1,979 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -27,6 +27,10 @@ conda activate sourmash_resources

[![](plots/compute.svg?sanitize=true)](plots/compute.svg)

### index

[![](plots/index.svg?sanitize=true)](plots/index.svg)

### search

[![](plots/search.svg?sanitize=true)](plots/search.svg)
Expand Down
19 changes: 17 additions & 2 deletions Snakefile
Expand Up @@ -3,9 +3,9 @@ from snakemake.remote.S3 import RemoteProvider as S3RemoteProvider
S3 = S3RemoteProvider(keep_local=True)

COMMANDS_KSIZE = ["gather", "search", "lca_gather", "lca_search", "compare"]
COMMANDS = COMMANDS_KSIZE + ["compute"]
COMMANDS = COMMANDS_KSIZE + ["compute"] + ["index"]

VERSIONS = ["2.0.1", "2.1.0", "2.2.0", "2.3.1", "3.0.1", "rust_sig", "optimize/gather"]
VERSIONS = ["2.0.1", "2.1.0", "2.2.0", "2.3.1", "3.0.1", "rust_sig", "feature/unload"]
#VERSIONS = ["2.3.1", "3.0.0", "3.0.1", "rust_sig", "feature/unload"]


Expand Down Expand Up @@ -43,6 +43,7 @@ rule summary:
input:
expand('benchmarks/{{version}}/{command}_k51_HSMA33OT.fastq.gz.tsv', command=COMMANDS_KSIZE),
'benchmarks/{version}/compute_HSMA33OT.fastq.gz.tsv',
'benchmarks/{version}/index_k51.tsv'
shell: "scripts/summary.py --csv {output} {wildcards.version}"

rule plot:
Expand Down Expand Up @@ -81,6 +82,20 @@ rule gather:
{input.db}
"""

rule index:
output: "outputs/{version}/index/k{ksize}.sbt.json"
input:
db="inputs/dbs/genbank-d2-k{ksize}.sbt.json",
params:
ksize = "{ksize}"
conda: 'envs/sourmash_{version}.yml'
benchmark: 'benchmarks/{version}/index_k{ksize}.tsv'
shell: """
sourmash index -k {params.ksize} \
{output} \
inputs/dbs/.sbt.genbank-d2-k{params.ksize}/1*
"""

rule compare:
output: "outputs/{version}/compare/k{ksize}/{filename}.csv"
input:
Expand Down

0 comments on commit d2e8fbc

Please sign in to comment.