Skip to content

Commit

Permalink
print stdout note on skipped pseudogene detection b/c light db #320
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Sep 24, 2024
1 parent 2932ebd commit c8a93e1
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions bakta/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,20 @@ def main():
anno.combine_annotation(cds) # combine IPS & PSC annotations and mark hypotheticals

hypotheticals = [cds for cds in cdss if 'hypothetical' in cds and 'edge' not in cds and cds.get('start_type', 'Edge') != 'Edge']
if(len(hypotheticals) > 0 and not cfg.skip_pseudo and cfg.db_info['type'] == 'full'):
print('\tdetect pseudogenes...')
log.debug('search pseudogene candidates')
pseudo_candidates = feat_cds.predict_pseudo_candidates(hypotheticals)
print(f'\t\tpseudogene candidates: {len(pseudo_candidates)}')
pseudogenes = feat_cds.detect_pseudogenes(pseudo_candidates, cdss, genome) if len(pseudo_candidates) > 0 else []
psc.lookup(pseudogenes, pseudo=True)
pscc.lookup(pseudogenes, pseudo=True)
for pseudogene in pseudogenes:
anno.combine_annotation(pseudogene)
print(f'\t\tfound pseudogenes: {len(pseudogenes)}')
if(len(hypotheticals) > 0 and not cfg.skip_pseudo):
if(cfg.db_info['type'] == 'full'):
print('\tdetect pseudogenes...')
log.debug('search pseudogene candidates')
pseudo_candidates = feat_cds.predict_pseudo_candidates(hypotheticals)
print(f'\t\tpseudogene candidates: {len(pseudo_candidates)}')
pseudogenes = feat_cds.detect_pseudogenes(pseudo_candidates, cdss, genome) if len(pseudo_candidates) > 0 else []
psc.lookup(pseudogenes, pseudo=True)
pscc.lookup(pseudogenes, pseudo=True)
for pseudogene in pseudogenes:
anno.combine_annotation(pseudogene)
print(f'\t\tfound pseudogenes: {len(pseudogenes)}')
else:
print(f'\tskip pseudogene detection with light db version')
hypotheticals = [cds for cds in cdss if 'hypothetical' in cds]
if(len(hypotheticals) > 0):
log.debug('analyze hypotheticals')
Expand Down

0 comments on commit c8a93e1

Please sign in to comment.