Skip to content

Commit

Permalink
time for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott G. Daniel committed Jul 24, 2020
1 parent 51a3207 commit 9e7b9ed
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
1 change: 1 addition & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ include: "rules/diversity/diversity.rules"
include: "rules/unassign/unassign.rules"
include: "rules/report/report.rules"
include: "rules/dada2_species/dada2.rules"
include: "rules/vsearch/vsearch.rules"

workdir: PROJECT_DIR

Expand Down
8 changes: 7 additions & 1 deletion rules/targets/targets.rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ TARGET_REPORT = [str(CORE_METRIC_DIR + "/basic_bioinformatics_report/Basic_Bioin
TARGET_DADA2SP = [str(DENOISE_DIR + "/representative_seq_fasta/dada2/dada2_species_assignments.tsv"),
str(DENOISE_DIR + "/representative_seq_fasta/dada2/dada2.RData")]

TARGET_VSEARCH = [
str(DENOISE_DIR + "/representative_seq_fasta/vsearch/vsearch_report.tsv"),
str(DENOISE_DIR + "/representative_seq_fasta/vsearch/vsearch.fasta")
]

TARGET_ALL = (
TARGET_DNABC +
TARGET_QIIME_IMPORT +
Expand All @@ -34,5 +39,6 @@ TARGET_ALL = (
TARGET_DIVERSITY +
TARGET_UNASSIGN +
TARGET_REPORT +
TARGET_DADA2SP
TARGET_DADA2SP +
TARGET_VSEARCH
)
34 changes: 34 additions & 0 deletions rules/vsearch/vsearch.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
rule all_vsearch:
input:
TARGET_VSEARCH

rule run_vsearch:
input:
query = DENOISE_DIR + "/representative_seq_fasta/dna-sequences.fasta",
db = config["sbx_vsearch"]["db"]
output:
reports = DENOISE_DIR + "/representative_seq_fasta/vsearch/vsearch_report.tsv"),
alignments = DENOISE_DIR + "/representative_seq_fasta/vsearch/vsearch.fasta")
threads:
config["vsearch"]["threads"]
params:
iddef = config["vsearch"]["iddef"],
min_id = config["vsearch"]["min_id"],
userfields = config["vsearch"]["userfields"],
weak_id = config["vsearch"]["weak_id"],
fasta_width = config["vsearch"]["fasta_width"],
maxaccepts = config["vsearch"]["maxaccepts"]
shell:
"""
vsearch --usearch_global {input.query} \
--db {input.db} \
--userout {output.reports} \
--matched {output.alignments} \
--threads {threads} \
--iddef {params.iddef} \
--id {params.min_id} \
--userfields {params.userfields} \
--weak_id {params.weak_id} \
--fasta_width {params.fasta_width} \
--maxaccepts {params.maxaccepts}
"""

0 comments on commit 9e7b9ed

Please sign in to comment.