Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
edna
snakemake_rapidrun_obitools
Commits
f656bb80
Commit
f656bb80
authored
Apr 07, 2021
by
peguerin
Browse files
custom reference database taxonomic assignment rule
parent
dfed488b
Changes
1
Hide whitespace changes
Inline
Side-by-side
rules/custom_taxonomic_assignment.smk
0 → 100644
View file @
f656bb80
__author__ = "Pierre-Edouard Guerin"
__license__ = "MIT"
## Assign each sequence to a taxon
rule custom_taxonomic_assignment:
input:
'results/14_dereplicate_runs/{projmarkrun}.uniq.fasta'
output:
'results/15_taxonomic_assignment/{projmarkrun}.tag.u.fasta'
threads:
workflow.cores * 0.5
conda:
'../envs/obitools_envs.yaml'
singularity:
config["singularity"]["obitools"]
params:
drun= lambda wildcards: dfpmr[dfpmr.projmarkrun == wildcards.projmarkrun].to_dict('records')[0],
log:
'logs/15_taxonomic_assignment/{projmarkrun}.log'
shell:
'''
mkdir -p results/15_taxonomic_assignment/{params.drun[projet]}/{params.drun[marker]};
SUB="_custom"
STR={input}
if [[ "$STR" == *"$SUB"* ]]; then
ecotag -t {params.drun[bdr]} -R {params.drun[fasta]} {input} > {output} 2> {log}
else
ecotag -d {params.drun[bdr]} -R {params.drun[fasta]} {input} > {output} 2> {log}
fi
'''
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment