Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KNOT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
MARIJON Pierre
KNOT
Commits
440c256e
Commit
440c256e
authored
Oct 18, 2018
by
MARIJON Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support of no contigs graph by create tmp file
parent
3524c727
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
knot/__main__.py
knot/__main__.py
+13
-6
No files found.
knot/__main__.py
View file @
440c256e
...
...
@@ -5,6 +5,7 @@ import io
import
os
import
csv
import
sys
import
tempfile
import
argparse
import
subprocess
...
...
@@ -31,8 +32,8 @@ def main(args = None):
# A B C E G H I J K L M N Q V W X Y Z
parser
.
add_argument
(
"-C"
,
"--contigs"
,
required
=
True
,
help
=
"fasta file than contains contigs"
)
parser
.
add_argument
(
"-g"
,
"--contigs_graph"
,
required
=
True
,
help
=
"contig graph"
)
parser
.
add_argument
(
"-g"
,
"--contigs_graph"
,
help
=
"contig
s
graph"
)
parser
.
add_argument
(
"-i"
,
"--raw-reads"
,
help
=
"read used for assembly"
)
parser
.
add_argument
(
"-m"
,
"--correct-reads"
,
...
...
@@ -45,10 +46,8 @@ def main(args = None):
args
,
unknow_arg
=
parser
.
parse_known_args
(
args
)
args
=
vars
(
args
)
package_path
=
os
.
path
.
dirname
(
__file__
)
+
os
.
sep
snakemake_rule
=
os
.
path
.
join
(
package_path
,
"main.rules"
)
snakemake_config_path
=
os
.
path
.
join
(
package_path
,
"config.yaml"
)
# Check parameter
## raw_reads or correct
go_out
=
False
if
args
[
"raw_reads"
]
is
None
and
args
[
"correct_reads"
]
is
None
:
print
(
"You need set --raw-reads or --correct-reads
\n
"
,
file
=
sys
.
stderr
)
...
...
@@ -62,6 +61,14 @@ def main(args = None):
parser
.
print_help
()
sys
.
exit
(
1
)
## if contig graph isn't set generate empty file
if
args
[
"contigs_graph"
]
is
None
:
args
[
"contigs_graph"
]
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
).
name
package_path
=
os
.
path
.
dirname
(
__file__
)
+
os
.
sep
snakemake_rule
=
os
.
path
.
join
(
package_path
,
"main.rules"
)
snakemake_config_path
=
os
.
path
.
join
(
package_path
,
"config.yaml"
)
config
=
[
"contigs="
+
args
[
"contigs"
],
"out_prefix="
+
args
[
"output"
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment