Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Midoux Cedric
workflow_metagenomics
Commits
9b5550a4
Commit
9b5550a4
authored
Jun 26, 2020
by
Midoux Cedric
Browse files
vhm
parent
5efe1830
Changes
2
Hide whitespace changes
Inline
Side-by-side
global.smk
View file @
9b5550a4
...
...
@@ -28,6 +28,7 @@ rule all:
#expand("work/addon/catalogue.{sample}.unmapped.taxNames.tsv", sample=config["SAMPLES"]),
#virome
expand("report/viromeQC-{sample}.txt", sample=config["SAMPLES"]),
expand("work/virhostmatcher/{sample}/done", sample=config["SAMPLES"]),
include: "../workflow_metagenomics/quality.smk"
...
...
virome.smk
View file @
9b5550a4
...
...
@@ -19,3 +19,29 @@ rule viromeQC:
"--tempdir /projet/tmp/ "
"&& "
"conda deactivate "
rule virhostmatcher:
input:
unpack(contigs_input)
output:
done = "work/virhostmatcher/{sample}/done"
params:
splittedGenomes = "work/virhostmatcher/{sample}/splittedGenomes",
output = lambda wildcards, output: os.path.dirname(str(output))
shell:
"mkdir -p {params.splittedGenomes} "
"&& "
"awk '/^>/ {{if(x>0) {{close(outname); x=0}} match($0, \">([^| ]*)\", record);outname=sprintf(\"{params.splittedGenomes}/%s.fa\",record[1]); if (x>0) {{print >> outname}} else {{print > outname;}} x++; next;}} {{if(x>0) print >> outname;}}' {input} " # https://github.com/soedinglab/WIsH#tricks
"&& "
# "conda activate vhm "
# "&& "
"vhm.py "
"--virusFaDir {params.splittedGenomes} "
"--hostFaDir /projet/irstea/WIsH_2020/Host/ "
"--out {params.output} "
"--taxa /projet/irstea/WIsH_2020/Host.txt "
"--d2star 0 "
# "&& "
# "conda deactivate "
"&& "
"touch {output.done} "
Write
Preview
Markdown
is supported
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