Skip to content
Snippets Groups Projects
Commit 448d72a1 authored by Valentina Galata's avatar Valentina Galata
Browse files

analysis: added fastani (issue #80)

parent 9d4e2111
No related branches found
No related tags found
No related merge requests found
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- fastani=1.32
\ No newline at end of file
......@@ -39,7 +39,7 @@ rule analysis_mashmap_one2one:
out1=os.path.join(RESULTS_DIR, "analysis/mashmap/{rtype1}_{tool1}__{rtype2}_{tool2}.one2one.out")
out2=os.path.join(RESULTS_DIR, "analysis/mashmap/{rtype2}_{tool2}__{rtype1}_{tool1}.one2one.out")
log:
"logs/analysis.mashmap.one2on2.{rtype1}.{tool1}.{rtype2}.{tool2}.log"
"logs/analysis.mashmap.one2one2.{rtype1}.{tool1}.{rtype2}.{tool2}.log"
wildcard_constraints:
rtype1="|".join(READ_TYPES),
rtype2="|".join(READ_TYPES),
......@@ -59,6 +59,34 @@ rule analysis_mashmap_one2one:
"mashmap -r ${asm2} -q ${asm1} {params.params} -t {threads} -o {output.out2} && "
"date) &> {log}"
##################################################
# FastANI
rule analysis_fastani_one2one:
input:
expand(
os.path.join(RESULTS_DIR, "assembly/{rtype_tool}/ASSEMBLY.POLISHED.fasta"),
rtype_tool=["%s/%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS],
)
output:
out=os.path.join(RESULTS_DIR, "analysis/fastani/many2many.out"),
qlrl=temp(os.path.join(RESULTS_DIR, "analysis/fastani/input.txt"))
log:
"logs/analysis.fastani.many2many.log"
threads:
config["fastani"]["threads"]
params:
params="-s 1000 -pi 95 -f one-to-one --noSplit"
conda:
os.path.join(ENV_DIR, "fastani.yaml")
message:
"fastani: one-to-one: {input}"
shell:
"(date && "
"echo \"{input}\" | sed 's/\s\+/\\n/g' > {output.qlrl} && "
"fastANI --ql {output.qlrl} --rl {output.qlrl} -o {output.out} --threads {threads} && "
"date) &> {log}"
##################################################
# CD-HIT
# https://github.com/weizhongli/cdhit/wiki/3.-User's-Guide#CDHIT2D
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment