Skip to content

Commit

Permalink
better handle merging terminal1/terminal2 features
Browse files Browse the repository at this point in the history
  • Loading branch information
Bribak committed Jul 2, 2024
1 parent db6c19d commit f6ff830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/lib/glycowork/motif/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def annotate_switchboard(glycan):
bag1 = list(map(get_terminal_structures, glycans))
if 'terminal2' in feature_set:
bag2 = [get_terminal_structures(glycan, size = 2) for glycan in glycans]
bag = bag1 + bag2
bag = [a + b for a, b in zip(bag1, bag2)] if (bag1 and bag2) else bag1 + bag2
repertoire = set(unwrap(bag))
repertoire2 = [re.sub(r"\(([ab])(\d)-(\d)\)", r"(\1\2-?)", g) for g in repertoire]
repertoire2 = set([k for k in repertoire2 if repertoire2.count(k) > 1 and k not in repertoire])
Expand Down
2 changes: 1 addition & 1 deletion glycowork/motif/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def annotate_switchboard(glycan):
bag1 = list(map(get_terminal_structures, glycans))
if 'terminal2' in feature_set:
bag2 = [get_terminal_structures(glycan, size = 2) for glycan in glycans]
bag = bag1 + bag2
bag = [a + b for a, b in zip(bag1, bag2)] if (bag1 and bag2) else bag1 + bag2
repertoire = set(unwrap(bag))
repertoire2 = [re.sub(r"\(([ab])(\d)-(\d)\)", r"(\1\2-?)", g) for g in repertoire]
repertoire2 = set([k for k in repertoire2 if repertoire2.count(k) > 1 and k not in repertoire])
Expand Down

0 comments on commit f6ff830

Please sign in to comment.