Skip to content

Commit

Permalink
DEV: Update phrog comp detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Feb 16, 2023
1 parent c6a8dfb commit 10fb566
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions phables/workflow/scripts/phables_utils/component_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ def get_components(
unitig = component[0]
phrogs_present = False

for phrog in unitig_phrogs[unitig_names[unitig]]:
if "head and packaging" in phrog_dict[phrog]:
head_present = True
if "connector" in phrog_dict[phrog]:
connector_present = True
if "portal" in phrog_dict[phrog]:
tail_present = True
if "lysis" in phrog_dict[phrog]:
lysis_present = True
if unitig_names[unitig] in unitig_phrogs:
for phrog in unitig_phrogs[unitig_names[unitig]]:
if "head and packaging" in phrog_dict[phrog]:
head_present = True
if "connector" in phrog_dict[phrog]:
connector_present = True
if "portal" in phrog_dict[phrog]:
tail_present = True
if "lysis" in phrog_dict[phrog]:
lysis_present = True

phrogs_found.add(phrog)
phrogs_found.add(phrog)

if head_present or connector_present or tail_present or lysis_present:
phrogs_present = True
Expand Down

0 comments on commit 10fb566

Please sign in to comment.