Skip to content

Commit

Permalink
fix pfam metadata
Browse files Browse the repository at this point in the history
Former-commit-id: b0be50a
  • Loading branch information
PedroMTQ committed May 28, 2021
1 parent 15f2a17 commit bdeeaba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions source/MANTIS_Assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,5 @@ def processes_handler(self, target_worker_function, worker_count, add_sentinels=

if __name__ == '__main__':
p = MANTIS_Assembler()
print(p.mantis_paths)
#p.mantis_paths['tcdb']='/home/pedroq/Desktop/test_mantis/tcdb/'
#test=p.compile_tcdb_metadata()
p.get_essential_genes_pfam(['P05652','P05649'])
p.mantis_paths['pfam']='/media/HDD/data/mantis_hmm/pfam/'
p.compile_pfam_metadata()
6 changes: 5 additions & 1 deletion source/MANTIS_DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ def read_pfam2go(self):
go_annots = line[1].split(';')
go_description = [i.replace('GO:', '').strip() for i in go_annots if not re.search('GO:\d{3,}', i)]
go_ids = [i.replace('GO:', '').strip() for i in go_annots if re.search('GO:\d{3,}', i)]
res[pfam_id] = {'go': set(go_ids), 'description': set(go_description)}
if pfam_id not in res:
res[pfam_id] = {'go': set(go_ids), 'description': set(go_description)}
else:
res[pfam_id]['go'].update(go_ids)
res[pfam_id]['description'].update(go_description)
line = pfam2go_file.readline()
return res

Expand Down

0 comments on commit bdeeaba

Please sign in to comment.