Skip to content

Commit 47184f0

Browse files
committed
adopt the balst parsing to new uniprot standards
1 parent 84ac4f1 commit 47184f0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

genome_annotation_pipeline/eukaryotic_ncbi_submission.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ def parse_blastxml(input_path, augustus_mapping, feature_table, annotation_count
333333
Hit_def changed: It now looks like:
334334
'RecName: Full=Erythronolide synthase, modules 3 and 4; Short=PKS; AltName: Full=6-deoxyerythronolide B synthase II; AltName: Full=DEBS 2; AltName: Full=ORF 2'
335335
"""
336-
accession = filter(lambda token: token.startswith('RecName:'), map(str.strip, alignment.hit_def.split(';')))[0].split('Full=')[-1]
336+
print alignment.hit_def
337+
accession = alignment.hit_def.encode('utf8')
338+
accession = filter(lambda token: token.startswith('RecName:'), map(str.strip, accession.split(';')))[0].split('Full=')[-1]
337339
accession = change_according_reviewer(accession, note_line = False)
338340

339341
feature_table_text[ hsp.bits ] += '%i\t%i\tgene\n' % (gene_start, gene_end)

genome_annotation_pipeline/prokaryotic_ncbi_submission.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ def parse_blastxml(input_path, glimmer_mapping, feature_table, annotation_count_
149149
Hit_def changed: It now looks like:
150150
'RecName: Full=Erythronolide synthase, modules 3 and 4; Short=PKS; AltName: Full=6-deoxyerythronolide B synthase II; AltName: Full=DEBS 2; AltName: Full=ORF 2'
151151
"""
152-
accession = filter(lambda token: token.startswith('RecName:'), map(str.strip, alignment.hit_def.split(';')))[0].split('Full=')[-1]
152+
print alignment.hit_def
153+
accession = alignment.hit_def.encode('utf8')
154+
accession = filter(lambda token: token.startswith('RecName:'), map(str.strip, accession.split(';')))[0].split('Full=')[-1]
153155

154156

155157
assert change_according_reviewer('Pimelyl-[acyl-carrier protein] methyl ester esterase', note_line = False) == 'Pimelyl-[acyl-carrier protein] methyl ester esterase'

0 commit comments

Comments
 (0)