Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IMP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMP-dev
IMP
Commits
61d977b2
Commit
61d977b2
authored
10 years ago
by
Shaman Narayanasamy
Browse files
Options
Downloads
Patches
Plain Diff
Add Trinity MT assembly module. Commented out at the moment
parent
c95aa2d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rules/Assembly/MGMT.rules
+114
-7
114 additions, 7 deletions
rules/Assembly/MGMT.rules
rules/Assembly/master.rules
+3
-3
3 additions, 3 deletions
rules/Assembly/master.rules
with
117 additions
and
10 deletions
rules/Assembly/MGMT.rules
+
114
−
7
View file @
61d977b2
################
#
## MT
SECTION
################
################
###################################################################################
#
MT ASSEEMBLY
SECTION
################
###################################################################################
rule ASSEMBLY_MT_ASSEMBLY_1:
#########################
## ## MT MEGAHIT ASSEMBLY
#########################
rule ASSEMBLY_MT_MEGAHIT_1:
log:
A_LOG
benchmark:
...
...
@@ -27,7 +31,7 @@ rule ASSEMBLY_MT_ASSEMBLY_1:
"""
rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_
ASSEMBLY
_1:
rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_
MEGAHIT
_1:
log:
A_LOG
benchmark:
...
...
@@ -60,7 +64,7 @@ rule ASSEMBLY_MT_EXTRACT_UNMAPPED_FROM_ASSEMBLY_1:
rm -rf $BUFFER* $TMP_FILE
"""
rule ASSEMBLY_MT_
ASSEMBLY
_2:
rule ASSEMBLY_MT_
MEGAHIT
_2:
log:
A_LOG
benchmark:
...
...
@@ -83,7 +87,7 @@ rule ASSEMBLY_MT_ASSEMBLY_2:
--input-cmd "cat {input}" -t {THREADS} --continue > {log} 2>&1
"""
rule ASSEMBLY_MT_CAT_
ASSEMBLY
:
rule ASSEMBLY_MT_CAT_
MEGAHIT
:
log:
A_LOG
benchmark:
...
...
@@ -97,6 +101,109 @@ rule ASSEMBLY_MT_CAT_ASSEMBLY:
"""
cat {input[0]} {input[1]} | awk '/^>/{{print ">contig_MT_" ++i; next}}{{print}}' > {output}
"""
#########################
## ## MT MEGAHIT 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}
# """
##
##################
# ## MGMT SECTION - ASSEMBLY
##################
...
...
This diff is collapsed.
Click to expand it.
rules/Assembly/master.rules
+
3
−
3
View file @
61d977b2
...
...
@@ -34,9 +34,9 @@ rule ASSEMBLY_MG_ALL:
shell:
"echo 'MG Assembly Done'"
#rule ASSEMBLY_FAST:
#rule ASSEMBLY_
MG_
FAST:
# input:
# "%s/MG
MT
.assembly.merged.fa" % A_OUT
# "%s/MG.assembly.merged.fa" % A_OUT
# shell:
# "echo 'MG
MT
fast assembly
D
one'"
# "echo 'MG fast assembly
d
one'"
#
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment