Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
Mirrors
mutalyzer
Commits
2801c926
Commit
2801c926
authored
10 years ago
by
Vermaat
Browse files
Options
Downloads
Plain Diff
Merge pull request #32 from LUMC/fix-esummary
Use esummary 2.0 response format
parents
298e2f24
42e2f88a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mutalyzer/Retriever.py
+18
-9
18 additions, 9 deletions
mutalyzer/Retriever.py
with
18 additions
and
9 deletions
mutalyzer/Retriever.py
+
18
−
9
View file @
2801c926
...
...
@@ -585,24 +585,33 @@ class GenBankRetriever(Retriever):
'
Could not get mapping information for gene %s.
'
%
gene
)
return
None
if
unicode
(
summary
[
0
][
"
NomenclatureSymbol
"
]).
lower
()
==
gene
.
lower
()
:
# Found it.
if
not
summary
[
0
][
"
GenomicInfo
"
]
:
try
:
document
=
summary
[
'
DocumentSummarySet
'
][
'
DocumentSummary
'
][
0
]
except
(
KeyError
,
IndexError
):
self
.
_output
.
addMessage
(
__file__
,
-
1
,
'
INFO
'
,
'
Error parsing Entrez esummary result.
'
)
self
.
_output
.
addMessage
(
__file__
,
4
,
'
ERETR
'
,
'
Could not get mapping information for gene %s.
'
%
gene
)
return
None
if
unicode
(
document
[
"
NomenclatureSymbol
"
]).
lower
()
==
gene
.
lower
()
:
# Found it.
if
not
document
[
"
GenomicInfo
"
]
:
self
.
_output
.
addMessage
(
__file__
,
4
,
"
ENOMAPPING
"
,
"
No mapping information found for gene %s.
"
%
gene
)
return
None
#if
ChrAccVer
=
unicode
(
summary
[
0
]
[
"
GenomicInfo
"
][
0
][
"
ChrAccVer
"
])
ChrLoc
=
unicode
(
summary
[
0
]
[
"
GenomicInfo
"
][
0
][
"
ChrLoc
"
])
ChrStart
=
int
(
summary
[
0
]
[
"
GenomicInfo
"
][
0
][
"
ChrStart
"
])
ChrStop
=
int
(
summary
[
0
]
[
"
GenomicInfo
"
][
0
][
"
ChrStop
"
])
ChrAccVer
=
unicode
(
document
[
"
GenomicInfo
"
][
0
][
"
ChrAccVer
"
])
ChrLoc
=
unicode
(
document
[
"
GenomicInfo
"
][
0
][
"
ChrLoc
"
])
ChrStart
=
int
(
document
[
"
GenomicInfo
"
][
0
][
"
ChrStart
"
])
ChrStop
=
int
(
document
[
"
GenomicInfo
"
][
0
][
"
ChrStop
"
])
break
#if
# Collect official symbols that has this gene as alias in case we
# can not find anything.
if
gene
in
[
unicode
(
a
)
for
a
in
summary
[
0
]
[
"
OtherAliases
"
]]
and
\
summary
[
0
]
[
"
NomenclatureSymbol
"
]
:
aliases
.
append
(
unicode
(
summary
[
0
]
[
"
NomenclatureSymbol
"
]))
if
gene
in
[
unicode
(
a
)
for
a
in
document
[
"
OtherAliases
"
]]
and
\
document
[
"
NomenclatureSymbol
"
]
:
aliases
.
append
(
unicode
(
document
[
"
NomenclatureSymbol
"
]))
#for
if
not
ChrAccVer
:
# We did not find any genes.
...
...
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