Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
profileview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Riccardo Vicedomini
profileview
Commits
cfb5aa85
Commit
cfb5aa85
authored
Jul 19, 2019
by
Riccardo Vicedomini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip logo generation if there are no conserved positions
parent
1e4024b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
parseHHR.py
scripts/parseHHR.py
+6
-1
No files found.
scripts/parseHHR.py
View file @
cfb5aa85
...
...
@@ -241,11 +241,16 @@ def main( argv = None ):
#queryConsensus = [ qc for i,qc in enumerate(hhm.consensus) ] # if hhm.conserved[i] ]
#queryCovered = BitVector(size=len(hhm.master_seq))
# skip if no conserved positions
if
hhm
.
conserved
.
count_bits
()
<=
0
:
continue
# output sequence logo restricted to conserved positions
with
open
(
"{}/{}.fas"
.
format
(
args
.
fasDir
,
queryName
),
'r'
)
as
fas
:
fas_str
=
""
for
rec
in
SeqIO
.
parse
(
fas
,
'fasta'
):
fas_str
+=
">{}
\n
{}
\n
"
.
format
(
rec
.
id
,
''
.
join
([
c
for
i
,
c
in
enumerate
(
rec
.
seq
)
if
hhm
.
conserved
[
i
]
]))
seq
=
''
.
join
([
c
for
i
,
c
in
enumerate
(
rec
.
seq
)
if
hhm
.
conserved
[
i
]
])
fas_str
+=
">{}
\n
{}
\n
"
.
format
(
rec
.
id
,
seq
)
loptions
=
weblogo
.
LogoOptions
(
logo_title
=
"{} ({})"
.
format
(
hhmNameDict
[
queryName
],
queryName
),
unit_name
=
"bits"
,
...
...
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