Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
metaclade2
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
metaclade2
Commits
b789b9ea
Commit
b789b9ea
authored
May 09, 2020
by
Riccardo Vicedomini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
domain annotation is now sorted by sequence-id and sequence-start for simple architecture output
parent
32ef540c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
simple_arch.py
scripts/simple_arch.py
+18
-19
No files found.
scripts/simple_arch.py
View file @
b789b9ea
...
...
@@ -147,25 +147,24 @@ def main():
taxid2name
[
taxid
]
=
name
with
open
(
finalPredictionsFile
,
'w'
)
as
outFile
:
for
query
in
objReturn
:
for
i
in
range
(
0
,
len
(
objReturn
[
query
])):
if
not
objReturn
[
query
][
i
]
is
None
:
data
=
objReturn
[
query
][
i
]
evalue
=
data
[
I_EVALUE
]
bitscore
=
data
[
SCORE
]
modid
=
data
[
MODEL_NAME
]
modbeg
=
data
[
MODEL_START
]
modend
=
data
[
MODEL_END
]
modlen
=
data
[
MODEL_LEN
]
domid
=
data
[
TARGET_ACC
]
seqid
=
data
[
QUERY_NAME
]
seqbeg
=
data
[
SEQ_START
]
seqend
=
data
[
SEQ_END
]
seqlen
=
data
[
SEQ_LEN
]
accuracy
=
data
[
ACCURACY
]
modtaxid
=
data
[
MODEL_TAXID
]
modtaxname
=
taxid2name
.
get
(
modtaxid
,
'unavailable'
)
outFile
.
write
(
f
'{seqid}
\t
{seqbeg}
\t
{seqend}
\t
{seqlen}
\t
{domid}
\t
{modid}
\t
{modbeg}
\t
{modend}
\t
{modlen}
\t
{evalue}
\t
{bitscore}
\t
{accuracy}
\t
{modtaxname}
\n
'
)
for
query
in
sorted
(
objReturn
.
keys
()):
sortedHits
=
sorted
(
(
data
for
data
in
objReturn
[
query
]
if
data
is
not
None
),
key
=
lambda
d
:
d
[
SEQ_START
]
)
for
data
in
sortedHits
:
evalue
=
data
[
I_EVALUE
]
bitscore
=
data
[
SCORE
]
modid
=
data
[
MODEL_NAME
]
modbeg
=
data
[
MODEL_START
]
modend
=
data
[
MODEL_END
]
modlen
=
data
[
MODEL_LEN
]
domid
=
data
[
TARGET_ACC
]
seqid
=
data
[
QUERY_NAME
]
seqbeg
=
data
[
SEQ_START
]
seqend
=
data
[
SEQ_END
]
seqlen
=
data
[
SEQ_LEN
]
accuracy
=
data
[
ACCURACY
]
modtaxid
=
data
[
MODEL_TAXID
]
modtaxname
=
taxid2name
.
get
(
modtaxid
,
'unavailable'
)
outFile
.
write
(
f
'{seqid}
\t
{seqbeg}
\t
{seqend}
\t
{seqlen}
\t
{domid}
\t
{modid}
\t
{modbeg}
\t
{modend}
\t
{modlen}
\t
{evalue}
\t
{bitscore}
\t
{accuracy}
\t
{modtaxname}
\n
'
)
# END OF ARI CODE #
runtime
=
time
.
time
()
-
start_time
eprint
(
f
'[{script_name}] runtime: {runtime:.2f}'
)
...
...
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