From 792dbe387353ac551a0a8ee1b33e318ff361303a Mon Sep 17 00:00:00 2001 From: Shaman <shaman.narayanasamy@uni.lu> Date: Tue, 31 Mar 2015 14:37:39 +0200 Subject: [PATCH] Comment out Trinity --- rules/Assembly/MGMT.rules | 206 +++++++++++++++++++------------------- rules/Util.rules | 5 +- 2 files changed, 106 insertions(+), 105 deletions(-) diff --git a/rules/Assembly/MGMT.rules b/rules/Assembly/MGMT.rules index 7e97db8..5543f38 100644 --- a/rules/Assembly/MGMT.rules +++ b/rules/Assembly/MGMT.rules @@ -10,7 +10,7 @@ rule ASSEMBLY_MT_MEGAHIT_1: log: A_LOG benchmark: - "%s/benchmarks/ASSEMBLY_MT_ASSEMBLY_1.json" % A_OUT + "%s/benchmarks/ASSEMBLY_MT_MEGAHIT_1.json" % A_OUT input: preprocessed_mt('R1'), preprocessed_mt('R2'), @@ -35,7 +35,7 @@ rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_MEGAHIT_1: log: A_LOG benchmark: - "%s/benchmarks/ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_ASSEMBLY_1.json" % A_OUT + "%s/benchmarks/ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_MEGAHIT_1.json" % A_OUT input: preprocessed_mt('R1'), preprocessed_mt('R2'), @@ -68,7 +68,7 @@ rule ASSEMBLY_MT_MEGAHIT_2: log: A_LOG benchmark: - "%s/benchmarks/ASSEMBLY_MT_ASSEMBLY_2.json" % A_OUT + "%s/benchmarks/ASSEMBLY_MT_MEGAHIT_2.json" % A_OUT input: expand('{dir}/{name}', name=[ 'MT.R1.unmapped.fq', @@ -91,7 +91,7 @@ rule ASSEMBLY_MT_CAT_MEGAHIT: log: A_LOG benchmark: - "%s/benchmarks/ASSEMBLY_MT_CAT_ASSEMBLY.json" % A_OUT + "%s/benchmarks/ASSEMBLY_MT_CAT_MEGAHIT.json" % A_OUT input: '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT), '{dir}/MT.assembly_2/final.contigs.fa'.format(dir=A_OUT) @@ -104,105 +104,105 @@ rule ASSEMBLY_MT_CAT_MEGAHIT: ######################### ## ## MT TRINITY ASSEMBLY ######################### - -rule ASSEMBLY_MT_ASSEMBLY_TRINITY_1: - log: - A_LOG - benchmark: - "%s/benchmarks/ASSEMBLY_MT_ASSEMBLY_1.json" % A_OUT - input: - preprocessed_mt('R1'), - preprocessed_mt('R2'), - preprocessed_mt('SE') - output: - '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT) - params: - outdir = "{dir}/MT.assembly_1".format(dir=A_OUT) - shell: - """ - Trinity --seqType fq\ - --left {input[0]} --right {input[1]} --single {input[2]}\ - --output {output[0]}\ - --JM {MEMTOTAL}G --CPU {THREADS}\ - --inchworm_cpu {THREADS} --bflyHeapSpaceMax {MEMTOTAL}G\ - --bflyCPU {THREADS} --bflyCalculateCPU\ - --normalize_max_read_cov 25 --full_cleanup\ - """ - - -rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_TRINITY_1: - log: - A_LOG - benchmark: - "%s/benchmarks/ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_ASSEMBLY_1.json" % A_OUT - input: - preprocessed_mt('R1'), - preprocessed_mt('R2'), - preprocessed_mt('SE'), - '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT), - expand('{dir}/MT.assembly_1/final.contigs.fa.{ext}', dir=A_OUT, ext=['amb', 'bwt', 'pac', 'sa', 'ann']) - output: - expand('{dir}/{name}', name=[ - 'MT.R1.unmapped.fq', - 'MT.R2.unmapped.fq', - 'MT.SE.unmapped.fq'], dir=A_OUT) - shell: - """ - TMP_FILE=$(mktemp --tmpdir={TMPDIR} -t "alignment_XXXXXX.bam") - BUFFER=$(mktemp --tmpdir={TMPDIR} -t "alignment_buffer_XXXXXX.bam") - bwa mem -v 1 -t {THREADS} {input[3]} {input[0]} {input[1]} | samtools view -@ {THREADS} -bS - > $TMP_FILE - samtools merge -@ {THREADS} -u - \ - <(samtools view -@ {THREADS} -u -f 4 -F 264 $TMP_FILE) \ - <(samtools view -@ {THREADS} -u -f 8 -F 260 $TMP_FILE) \ - <(samtools view -@ {THREADS} -u -f 12 -F 256 $TMP_FILE) | \ - samtools view -@ {THREADS} -bF 0x800 - | samtools sort -o -@ {THREADS} -m {MEMCORE}G -n - $BUFFER | \ - bamToFastq -i stdin -fq {output[0]} -fq2 {output[1]} - bwa mem -v 1 -t {THREADS} {input[3]} {input[2]} | \ - samtools view -@ {THREADS} -bS - | samtools view -@ {THREADS} -uf 4 - | \ - bamToFastq -i stdin -fq {output[2]} - rm -rf $BUFFER* $TMP_FILE - """ - -rule ASSEMBLY_MT_TRINITY_2: - log: - A_LOG - benchmark: - "%s/benchmarks/ASSEMBLY_MT_ASSEMBLY_2.json" % A_OUT - input: - expand('{dir}/{name}', name=[ - 'MT.R1.unmapped.fq', - 'MT.R2.unmapped.fq', - 'MT.SE.unmapped.fq'], dir=A_OUT) - output: - '{dir}/MT.assembly_2/final.contigs.fa'.format(dir=A_OUT) - params: - outdir = "{dir}/MT.assembly_2".format(dir=A_OUT) - shell: - """ - Trinity --seqType fq\ - --left {input[0]} --right {input[1]} --single {input[2]}\ - --output {output[0]}\ - --JM {MEMTOTAL}G --CPU {THREADS}\ - --inchworm_cpu {THREADS} --bflyHeapSpaceMax {MEMTOTAL}G\ - --bflyCPU {THREADS} --bflyCalculateCPU\ - --normalize_max_read_cov 25 --full_cleanup\ - """ - -rule ASSEMBLY_MT_CAT_TRINITY: - log: - A_LOG - benchmark: - "%s/benchmarks/ASSEMBLY_MT_CAT_ASSEMBLY.json" % A_OUT - input: - '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT), - '{dir}/MT.assembly_2/final.contigs.fa'.format(dir=A_OUT) - output: - '{dir}/MT.assembly.cat.fa'.format(dir=A_OUT) - shell: - """ - cat {input[0]} {input[1]} | awk '/^>/{{print ">contig_MT_" ++i; next}}{{print}}' > {output} - """ - +# +#rule ASSEMBLY_MT_TRINITY_TRINITY_1: +# log: +# A_LOG +# benchmark: +# "%s/benchmarks/ASSEMBLY_MT_TRINITY_1.json" % A_OUT +# input: +# preprocessed_mt('R1'), +# preprocessed_mt('R2'), +# preprocessed_mt('SE') +# output: +# '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT) +# params: +# outdir = "{dir}/MT.assembly_1".format(dir=A_OUT) +# shell: +# """ +# Trinity --seqType fq\ +# --left {input[0]} --right {input[1]} --single {input[2]}\ +# --output {output[0]}\ +# --JM {MEMTOTAL}G --CPU {THREADS}\ +# --inchworm_cpu {THREADS} --bflyHeapSpaceMax {MEMTOTAL}G\ +# --bflyCPU {THREADS} --bflyCalculateCPU\ +# --normalize_max_read_cov 25 --full_cleanup\ +# """ +# +# +#rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_TRINITY_1: +# log: +# A_LOG +# benchmark: +# "%s/benchmarks/ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_TRINITY_1.json" % A_OUT +# input: +# preprocessed_mt('R1'), +# preprocessed_mt('R2'), +# preprocessed_mt('SE'), +# '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT), +# expand('{dir}/MT.assembly_1/final.contigs.fa.{ext}', dir=A_OUT, ext=['amb', 'bwt', 'pac', 'sa', 'ann']) +# output: +# expand('{dir}/{name}', name=[ +# 'MT.R1.unmapped.fq', +# 'MT.R2.unmapped.fq', +# 'MT.SE.unmapped.fq'], dir=A_OUT) +# shell: +# """ +# TMP_FILE=$(mktemp --tmpdir={TMPDIR} -t "alignment_XXXXXX.bam") +# BUFFER=$(mktemp --tmpdir={TMPDIR} -t "alignment_buffer_XXXXXX.bam") +# bwa mem -v 1 -t {THREADS} {input[3]} {input[0]} {input[1]} | samtools view -@ {THREADS} -bS - > $TMP_FILE +# samtools merge -@ {THREADS} -u - \ +# <(samtools view -@ {THREADS} -u -f 4 -F 264 $TMP_FILE) \ +# <(samtools view -@ {THREADS} -u -f 8 -F 260 $TMP_FILE) \ +# <(samtools view -@ {THREADS} -u -f 12 -F 256 $TMP_FILE) | \ +# samtools view -@ {THREADS} -bF 0x800 - | samtools sort -o -@ {THREADS} -m {MEMCORE}G -n - $BUFFER | \ +# bamToFastq -i stdin -fq {output[0]} -fq2 {output[1]} +# bwa mem -v 1 -t {THREADS} {input[3]} {input[2]} | \ +# samtools view -@ {THREADS} -bS - | samtools view -@ {THREADS} -uf 4 - | \ +# bamToFastq -i stdin -fq {output[2]} +# rm -rf $BUFFER* $TMP_FILE +# """ +# +#rule ASSEMBLY_MT_TRINITY_2: +# log: +# A_LOG +# benchmark: +# "%s/benchmarks/ASSEMBLY_MT_TRINITY_2.json" % A_OUT +# input: +# expand('{dir}/{name}', name=[ +# 'MT.R1.unmapped.fq', +# 'MT.R2.unmapped.fq', +# 'MT.SE.unmapped.fq'], dir=A_OUT) +# output: +# '{dir}/MT.assembly_2/final.contigs.fa'.format(dir=A_OUT) +# params: +# outdir = "{dir}/MT.assembly_2".format(dir=A_OUT) +# shell: +# """ +# Trinity --seqType fq\ +# --left {input[0]} --right {input[1]} --single {input[2]}\ +# --output {output[0]}\ +# --JM {MEMTOTAL}G --CPU {THREADS}\ +# --inchworm_cpu {THREADS} --bflyHeapSpaceMax {MEMTOTAL}G\ +# --bflyCPU {THREADS} --bflyCalculateCPU\ +# --normalize_max_read_cov 25 --full_cleanup\ +# """ +# +#rule ASSEMBLY_MT_CAT_TRINITY: +# log: +# A_LOG +# benchmark: +# "%s/benchmarks/ASSEMBLY_MT_CAT_TRINITY.json" % A_OUT +# input: +# '{dir}/MT.assembly_1/final.contigs.fa'.format(dir=A_OUT), +# '{dir}/MT.assembly_2/final.contigs.fa'.format(dir=A_OUT) +# output: +# '{dir}/MT.assembly.cat.fa'.format(dir=A_OUT) +# shell: +# """ +# cat {input[0]} {input[1]} | awk '/^>/{{print ">contig_MT_" ++i; next}}{{print}}' > {output} +# """ +# ################## # ## MGMT SECTION - ASSEMBLY ################## diff --git a/rules/Util.rules b/rules/Util.rules index fcf78ca..aea13ba 100644 --- a/rules/Util.rules +++ b/rules/Util.rules @@ -157,11 +157,11 @@ rule INDEX_FASTA_FILE: bwa index {wildcards.fasta} > {log} 2>&1 """ -rule CHECK_TOOLS_VERSION: +rule CHECK_TOOL_VERSION: log: U_LOG benchmark: - "%s/benchmarks/CHECK_TOOLS_VERSION.json" % U_OUT + "%s/benchmarks/CHECK_TOOL_VERSION.json" % U_OUT output: "%s/tools.versions" % U_OUT shell: @@ -191,6 +191,7 @@ rule CHECK_TOOLS_VERSION: echo "# cap3" >> {output} echo "# coverageBed" >> {output} echo "# bh_tsne" >> {output} + echo "# KronaTools" >> {output} """ -- GitLab