Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
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
schwede
ProMod3
Commits
a2a74135
Commit
a2a74135
authored
9 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Moved out decision for target seq name and seq file
parent
af746920
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/pymod/core/pm3argparse.py
+14
-6
14 additions, 6 deletions
core/pymod/core/pm3argparse.py
with
14 additions
and
6 deletions
core/pymod/core/pm3argparse.py
+
14
−
6
View file @
a2a74135
...
@@ -13,12 +13,13 @@ from ost import io, seq
...
@@ -13,12 +13,13 @@ from ost import io, seq
from
promod3.core
import
helper
from
promod3.core
import
helper
def
_FetchAlnFromFastaOpt
(
argstr
):
def
_GetTrgNameSeqFile
(
argstr
):
"""
"""
Sort out what is target name and what is the sequence file name.
Dissasemble an argument to
'
--fasta
'
into an alignment and return.
With only two items in the argument string to
'
--fasta
'
we allow arbitrary
orders. So we have to check for the
'
trg:
'
prefix. With this, sequence files
names may not start with
'
trg:
'
.
"""
"""
# get which element of the argument list is the target identifier and
# which one is the filename
if
argstr
[
0
].
startswith
(
'
trg:
'
):
if
argstr
[
0
].
startswith
(
'
trg:
'
):
trgname
=
argstr
[
0
][
4
:]
trgname
=
argstr
[
0
][
4
:]
seqfile
=
argstr
[
1
]
seqfile
=
argstr
[
1
]
...
@@ -35,8 +36,15 @@ def _FetchAlnFromFastaOpt(argstr):
...
@@ -35,8 +36,15 @@ def _FetchAlnFromFastaOpt(argstr):
"
argument
'
trg:
'
defining the
"
+
"
argument
'
trg:
'
defining the
"
+
"
target sequence name, empty one
"
+
"
target sequence name, empty one
"
+
"
found:
'
%s
'"
%
'
'
.
join
(
argstr
),
14
)
"
found:
'
%s
'"
%
'
'
.
join
(
argstr
),
14
)
# checking that alignment file exists
helper
.
FileExists
(
"
Alignment
"
,
12
,
seqfile
)
helper
.
FileExists
(
"
Alignment
"
,
12
,
seqfile
)
return
trgname
,
seqfile
def
_FetchAlnFromFastaOpt
(
argstr
):
"""
Dissasemble an argument to
'
--fasta
'
into an alignment and return.
"""
trgname
,
seqfile
=
_GetTrgNameSeqFile
(
argstr
)
# checking if alignment file has 'gz' extension
# checking if alignment file has 'gz' extension
is_gz
=
helper
.
FileGzip
(
"
Alignment
"
,
13
,
seqfile
)
is_gz
=
helper
.
FileGzip
(
"
Alignment
"
,
13
,
seqfile
)
# loading the alignment, switch for gzip
# loading the alignment, switch for gzip
...
...
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