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
9a5cc210
Commit
9a5cc210
authored
9 years ago
by
Yohan Jarosz
Browse files
Options
Downloads
Patches
Plain Diff
modify CL
parent
7f5627e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
IMP
+23
-12
23 additions, 12 deletions
IMP
with
23 additions
and
12 deletions
IMP
+
23
−
12
View file @
9a5cc210
...
...
@@ -13,18 +13,18 @@ __doc__ = """Integrated Metaomic Pipeline.
(____)(_/\/\_)(__)
Usage:
IMP -
d DATA
-o OUTPUT [--enter] [-n CONTAINER] [-e ENV] ... [COMMANDS ...]
IMP -
m MG1 -m MG2 -t MT1 -t MT2
-o OUTPUT [--enter] [-n CONTAINER] [-e ENV] ... [COMMANDS ...]
IMP (-h | --help)
IMP --version
Options:
-
d DATA
Path to the data
-
e ENV
En
vironment variable to pass to
the container
-
-enter
Enter the container
-
h --help
Show this help and exit
-
n CONTAINER Name of the container. Useful when you want to run a previous version of IMP
.
-
o OUTPUT Path to the output directory
-
e ENV
Environment variable to pass to the container
-
-enter
En
ter
the container
-
h --help
Show this help and exit
-
m MG
Path to the metagenomics paired files (must be 2 files).
-
t MT Path to the metatranscriptomic paired files (2 files)
.
-
n CONTAINER Name of the container. Useful when you want to run a previous version of IMP.
-o OUTPUT Path to the output directory
"""
...
...
@@ -39,18 +39,29 @@ if __name__ == '__main__':
CURRENT_PATH
=
Path
(
__file__
).
parent
.
abspath
()
print
(
args
)
data
=
Path
(
args
[
'
-d
'
]).
abspath
()
# find common path
mg_data
=
[
Path
(
p
).
abspath
()
for
p
in
args
[
'
-m
'
]]
mt_data
=
[
Path
(
p
).
abspath
()
for
p
in
args
[
'
-t
'
]]
common_path
=
Path
(
os
.
path
.
commonprefix
(
mg_data
+
mt_data
)).
dirname
()
# update data paths
mg_data
=
[
p
.
partition
(
common_path
)[
-
1
][
1
:]
for
p
in
mg_data
]
mt_data
=
[
p
.
partition
(
common_path
)[
-
1
][
1
:]
for
p
in
mt_data
]
output
=
Path
(
args
[
'
-o
'
]).
abspath
()
container_name
=
args
[
'
-n
'
]
is
not
None
and
args
[
'
-n
'
]
or
'
imp:latest
'
# configure IMP mount point to the docker container
mount_points
=
[
'
-v %s:/data
'
%
d
at
a
,
'
-v %s:/data
'
%
common_p
at
h
,
'
-v %s:/home/imp/integrated-metaomic-pipeline
'
%
CURRENT_PATH
,
'
-v %s:/output
'
%
output
]
# environement variables
envs
=
[
'
-e {}=
"
{}
"'
.
format
(
*
e
.
split
(
'
=
'
))
for
e
in
args
[
'
-e
'
]]
# environement variables (add MG and MT data)
envs
=
[
'
-e {}=
"
{}
"'
.
format
(
*
e
.
split
(
'
=
'
))
for
e
in
args
[
'
-e
'
]
+
[
"
MG=%s
"
%
'
'
.
join
(
mg_data
),
"
MT=%s
"
%
'
'
.
join
(
mt_data
)]
]
# CL
cmd
=
[
'
docker
'
,
'
run
'
]
+
mount_points
+
envs
...
...
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