Skip to content
Snippets Groups Projects
Commit c1f5fce1 authored by Susheel Busi's avatar Susheel Busi
Browse files

added rules and config parameters for SibeliaZ

parent 51dc11fa
No related branches found
No related tags found
1 merge request!78Add zymo workflow
......@@ -273,6 +273,11 @@ kaiju:
mash:
threads: 10
# Genome comparison: https://github.com/medvedevgroup/SibeliaZ
sibeliaz:
threads: 24
kmer: 25
mem: 2
##############################
# Binning
......
......@@ -42,6 +42,6 @@ snakemake -s ${ONTP_SMK} -rp --jobs 10 --local-cores 1 \
--cluster-config ${ONTP_SLURM} --cluster "${ONTP_CLUSTER}" --unlock
# run the pipeline
snakemake -s ${ONTP_SMK} -rp --jobs 10 --local-cores 1 \
snakemake -s ${ONTP_SMK} -rpn --jobs 10 --local-cores 1 \
--configfile ${ONTP_CONFIG} --use-conda --conda-prefix ${CONDA_PREFIX}/pipeline \
--cluster-config ${ONTP_SLURM} --cluster "${ONTP_CLUSTER}"
......@@ -40,3 +40,8 @@ zymo_headers:
comparison:
runtime: "00-00:15:00"
sibeliaz:
partition: "batch"
quality: "normal"
runtime: "00-04:00:00"
......@@ -73,8 +73,11 @@ rule all:
combi=["%s_%s__%s_%s" % (p[0][0], p[0][1], p[1][0], p[1][1]) for p in READ_ASSEMBLER_PAIRS] +
["%s_%s__%s_%s" % (p[1][0], p[1][1], p[0][0], p[0][1]) for p in READ_ASSEMBLER_PAIRS]),
expand(os.path.join(RESULTS_DIR, "analysis/comparison/{rtype_tool}_comparison.txt"),
rtype_tool=["%s_%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS])
rtype_tool=["%s_%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS]),
expand(os.path.join(RESULTS_DIR, "analysis/sibeliaz/{combi}_output/blocks_coords.gff"),
combi=["%s_%s__%s_%s" % (p[0][0], p[0][1], p[1][0], p[1][1]) for p in READ_ASSEMBLER_PAIRS] +
["%s_%s__%s_%s" % (p[1][0], p[1][1], p[0][0], p[0][1]) for p in READ_ASSEMBLER_PAIRS])
rule download_genomes:
output:
......@@ -248,3 +251,30 @@ rule comparison:
# save
df.to_csv(output[0], sep='\t', header=0)
#####################
# Genome comparison #
#####################
rule sibeliaz:
input:
asm1=os.path.join(DATA_DIR, "assembly/{rtype1}/{tool1}/ASSEMBLY.POLISHED.fasta"),
asm2=os.path.join(DATA_DIR, "assembly/{rtype2}/{tool2}/ASSEMBLY.POLISHED.fasta")
output:
os.path.join(RESULTS_DIR, "analysis/sibeliaz/{rtype1}_{tool1}__{rtype2}_{tool2}_output/blocks_coords.gff")
log:
out="logs/sibeliaz.{rtype1}.{tool1}.{rtype2}.{tool2}.out.log",
err="logs/sibeliaz.{rtype1}.{tool1}.{rtype2}.{tool2}.err.log"
wildcard_constraints:
rtype1="|".join(READ_TYPES),
rtype2="|".join(READ_TYPES),
tool1="|".join(ASSEMBLERS),
tool2="|".join(ASSEMBLERS)
conda:
os.path.join(ENV_DIR, "sibeliaz.yaml")
message:
"Genome comparision: Sibeliaz: {input.asm1} {input.asm2}"
shell:
"(date && "
"sibeliaz -t config[sibeliaz][threads] -k config[sibeliaz][kmer] -f config[threads][mem] -o $(dirname {output}) {input.asm1} {input.asm2} && "
"date) 2> {log.err} > {log.out}"
\ No newline at end of file
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