Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (41 sloc) 1.25 KB
podar_ref_genomes = expand("podar-ref/{num}.fa", num=range(0, 64))
podar_ref_signatures = [ x + '.sig' for x in podar_ref_genomes ]
rule all:
input:
"podar.cmp.matrix.png",
"podar.coclust.csv"
rule clean:
shell:
"rm -fr podar-ref podar.cmp* podar.coclust.*"
rule compare_and_plot:
input:
podar_ref_signatures
output:
"podar.cmp",
"podar.cmp.matrix.png"
shell:
"sourmash compare {input} -o podar.cmp && sourmash plot podar.cmp"
rule coclust:
input:
podar_ref_signatures
output:
"podar.coclust.csv",
"podar.coclust.txt",
"podar.coclust.log",
"podar.coclust.dendro.pdf"
shell:
"../cocluster.py --first podar-ref/*.fa.sig --second podar-ref/*.fa.sig -k 31 --cut-point=1.8 --prefix=podar.coclust > podar.coclust.txt 2> podar.coclust.log"
rule download_podar_ref_genomes:
output:
podar_ref_genomes
shell:
"""mkdir -p podar-ref && cd podar-ref && \
(curl -L https://osf.io/8uxj9/?action=download | tar xzf -)"""
# generic rule: compute signature
rule compute_sig:
input:
"{filename}"
output:
"{filename}.sig"
shell:
"sourmash compute -k 31 --scaled=10000 {input} -o {output}"
You can’t perform that action at this time.