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
b830aa60
Commit
b830aa60
authored
9 years ago
by
Shaman Narayanasamy
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' of
ssh://git-r3lab-server.uni.lu:8022/shaman.narayanasamy/IMP
into dev
parents
27b14136
f2c09bce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
IMP
+5
-2
5 additions, 2 deletions
IMP
docker/Dockerfile
+1
-2
1 addition, 2 deletions
docker/Dockerfile
rules/Assembly/MGMT.rules
+17
-4
17 additions, 4 deletions
rules/Assembly/MGMT.rules
src/config.imp.json
+1
-1
1 addition, 1 deletion
src/config.imp.json
with
24 additions
and
9 deletions
IMP
+
5
−
2
View file @
b830aa60
...
...
@@ -91,11 +91,14 @@ if __name__ == '__main__':
# CL
cmd
=
[
'
docker
'
,
'
run
'
]
+
mount_points
+
envs
#
reconfigure entrypoint
if --enter flag is specified
# if --enter flag is specified
, add attach tty and set mode to interactive
if
args
[
'
--enter
'
]:
cmd
+=
[
'
--entrypoint /bin/bash
-it
'
]
cmd
+=
[
'
-it
'
]
# add container name and commands to pass to snakemake
cmd
+=
[
container_name
]
+
args
[
'
COMMANDS
'
]
# if --enter flag is specified, change the command
if
args
[
'
--enter
'
]:
cmd
+=
[
'
/bin/bash
'
]
# parse CL correctly
cmd
=
shlex
.
split
(
'
'
.
join
(
cmd
))
print
(
"
Executing
"
,
'"'
,
'
'
.
join
(
cmd
),
'"'
)
...
...
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
1
−
2
View file @
b830aa60
...
...
@@ -216,5 +216,4 @@ ENV PATH /home/imp/lib/trinityrnaseq_r20140717:/home/imp/lib/Platypus_0.8.1:/hom
VOLUME
["/data", "/output"]
WORKDIR
/home/imp/integrated-metaomic-pipeline
ENTRYPOINT
["snakemake"]
CMD
["ALL"]
CMD
["snakemake", "ALL"]
This diff is collapsed.
Click to expand it.
rules/Assembly/MGMT.rules
+
17
−
4
View file @
b830aa60
...
...
@@ -21,13 +21,16 @@ rule ASSEMBLY_MT_MEGAHIT_1:
outdir = "{dir}/MT.assembly_1".format(dir=A_OUT)
shell:
"""
if [ -d "{params.outdir}" ]; then
rm -rf {params.outdir}
fi
MAX_READ_LEN=$(cat {input} | sed -n '1~4s/^@/>/p;2~4p' |\
awk '$0 ~ \">\" {{c=0\"\t\"; }} $0 !~ \">\" {{c+=length($0); max=(max>c)?max:c;}} END {{print max}}')
echo "Max read length: $MAX_READ_LEN"
MEMBYTES=$(({MEMTOTAL}*1000*1000*1000))
echo "Available memory in bytes: $MEMBYTES"
megahit -o {params.outdir} --cpu-only -m $MEMBYTES --mem-flag 1\
-l $MAX_READ_LEN --input-cmd "cat {input}" -t {THREADS}
--continue
>> {log} 2>&1
-l $MAX_READ_LEN --input-cmd "cat {input}" -t {THREADS} >> {log} 2>&1
"""
...
...
@@ -80,13 +83,17 @@ rule ASSEMBLY_MT_MEGAHIT_2:
outdir = "{dir}/MT.assembly_2".format(dir=A_OUT)
shell:
"""
if [ -d "{params.outdir}" ]; then
rm -rf {params.outdir}
fi
MAX_READ_LEN=$(cat {input} | sed -n '1~4s/^@/>/p;2~4p' | \
awk '$0 ~ \">\" {{c=0\"\t\"; }} $0 !~ \">\" {{c+=length($0); max=(max>c)?max:c;}} END {{print max}}')
echo "Max read length: $MAX_READ_LEN"
MEMBYTES=$(({MEMTOTAL}*1000*1000*1000))
echo "Available memory in bytes: $MEMBYTES"
megahit -o {params.outdir} --cpu-only -m $MEMBYTES --mem-flag 1 -l $MAX_READ_LEN \
--input-cmd "cat {input}" -t {THREADS}
--continue
>> {log} 2>&1
--input-cmd "cat {input}" -t {THREADS} >> {log} 2>&1
"""
rule ASSEMBLY_MT_CAT_MEGAHIT:
...
...
@@ -424,13 +431,16 @@ rule ASSEMBLY_MGMT_FAST_1:
outdir = "{dir}/MGMT.assembly_1".format(dir=A_OUT)
shell:
"""
if [ -d "{params.outdir}" ]; then
rm -rf {params.outdir}
fi
MAX_READ_LEN=$(cat {input} | sed -n '1~4s/^@/>/p;2~4p' |\
awk '$0 ~ \">\" {{c=0\"\t\"; }} $0 !~ \">\" {{c+=length($0); max=(max>c)?max:c;}} END {{print max}}')
echo "Max read length: $MAX_READ_LEN"
MEMBYTES=$(({MEMTOTAL}*1000*1000*1000))
echo "Available memory in bytes: $MEMBYTES"
megahit -o {params.outdir} --cpu-only -m $MEMBYTES --mem-flag 1\
-l $MAX_READ_LEN --input-cmd "cat {input}" -t {THREADS}
--continue
>> {log} 2>&1
-l $MAX_READ_LEN --input-cmd "cat {input}" -t {THREADS} >> {log} 2>&1
"""
rule ASSEMBLY_MGMT_EXTRACT_UNMAPPED_FROM_FAST_1:
...
...
@@ -482,9 +492,12 @@ rule ASSEMBLY_MGMT_FAST_2:
outdir = "{dir}/MGMT.assembly_2".format(dir=A_OUT)
shell:
"""
if [ -d "{params.outdir}" ]; then
rm -rf {params.outdir}
fi
MAX_READ_LEN=$(cat {input} | sed -n '1~4s/^@/>/p;2~4p' | \
awk '$0 ~ \">\" {{c=0\"\t\"; }} $0 !~ \">\" {{c+=length($0); max=(max>c)?max:c;}} END {{print max}}')
MEMBYTES=$(({MEMTOTAL}*1000*1000*1000))
megahit -o {params.outdir} --cpu-only -m $MEMBYTES --mem-flag 1 -l $MAX_READ_LEN \
--input-cmd "cat {input}" -t {THREADS}
--continue
>> {log} 2>&1
--input-cmd "cat {input}" -t {THREADS} >> {log} 2>&1
"""
This diff is collapsed.
Click to expand it.
src/config.imp.json
+
1
−
1
View file @
b830aa60
...
...
@@ -61,7 +61,7 @@
]
},
"prokka"
:
{
"pkg_url"
:
"http://w
ww.vicbioinformatics.com
/prokka-1.11.tar.gz"
,
"pkg_url"
:
"http
s
://w
ebdav-r3lab.uni.lu/public/R3lab/IMP
/prokka-1.11.tar.gz"
,
"databases"
:
[
"cm/Bacteria.i1i"
,
"genus/Staphylococcus.phr"
,
...
...
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