mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix for either a bug or undocumented feature in ElementTree that broke megablast and blast+ XML parsing in Python 2.7.
This commit is contained in:
@@ -53,7 +53,7 @@ def __main__():
|
||||
query = elem.findtext( "Iteration_query-def" )
|
||||
qLen = elem.findtext( "Iteration_query-len" )
|
||||
# for every <Hit> within <Iteration>
|
||||
for hit in elem.findall( "Iteration_hits/Hit/" ):
|
||||
for hit in elem.findall( "Iteration_hits/Hit" ):
|
||||
subject = hit.findtext( "Hit_id" )
|
||||
if re.search( '^gi', subject ):
|
||||
subject = subject.split('|')[1]
|
||||
|
||||
@@ -138,7 +138,7 @@ for event, elem in context:
|
||||
qlen = int(elem.findtext("Iteration_query-len"))
|
||||
|
||||
# for every <Hit> within <Iteration>
|
||||
for hit in elem.findall("Iteration_hits/Hit/"):
|
||||
for hit in elem.findall("Iteration_hits/Hit"):
|
||||
#Expecting either this,
|
||||
# <Hit_id>gi|3024260|sp|P56514.1|OPSD_BUFBU</Hit_id>
|
||||
# <Hit_def>RecName: Full=Rhodopsin</Hit_def>
|
||||
|
||||
Reference in New Issue
Block a user