Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
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
openstructure
Commits
fdc51c74
Commit
fdc51c74
authored
5 years ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
Decode output of Blast to return a string with outfmt=1.
parent
0a706cba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/bindings/pymod/blast.py
+7
-4
7 additions, 4 deletions
modules/bindings/pymod/blast.py
with
7 additions
and
4 deletions
modules/bindings/pymod/blast.py
+
7
−
4
View file @
fdc51c74
...
...
@@ -208,8 +208,8 @@ def BlastVersion(blast_location=None):
def
Blast
(
query
,
database
,
gap_open
=
11
,
gap_ext
=
1
,
matrix
=
'
BLOSUM62
'
,
blast_location
=
None
,
outfmt
=
0
,
filter_low_complexity
=
True
):
"""
Runs a protein vs. protein blast search. The results are returned
as a
list of :class:`BlastHit` instances
.
Runs a protein vs. protein blast search. The results are returned
according to the value of the ``outfmt`` parameter
.
:param query: the query sequence
:type query: :class:`seq.ConstSequenceHandle`
...
...
@@ -224,10 +224,13 @@ def Blast(query, database, gap_open=11, gap_ext=1, matrix='BLOSUM62',
:param gap_ext: Gap extension penalty. Only a subset of gap extension
penalties are supported for each of the substitution matrices. Consult the
blast docs for more information.
:param outfmt: output format, where
'
0
'
corresponds to default output (parsed blast output and 1 to raw output)
:param outfmt: output format, where
'
0
'
corresponds to default output (parsed
blast output and 1 to raw string output).
:param filter_low_complexity: Mask off segments of the query sequence that
have low compositional complexity, as determined by the SEG program of
Wootton & Federhen (Computers and Chemistry, 1993)
:rtype: :class:`BlastHit` (with ``outfmt=0``) or :class:`str`
(with ``outfmt=1``)
"""
subst_mats
=
(
'
BLOSUM45
'
,
'
BLOSUM62
'
,
'
BLOSUM80
'
,
'
PAM30
'
,
'
PAM70
'
,)
if
matrix
not
in
subst_mats
:
...
...
@@ -281,4 +284,4 @@ def Blast(query, database, gap_open=11, gap_ext=1, matrix='BLOSUM62',
if
outfmt
==
0
:
return
ParseBlastOutput
(
stdout
.
decode
())
else
:
return
stdout
return
stdout
.
decode
()
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