Skip to content

Commit

Permalink
Update regex to (?=(ELM-REGEX)) to allow variable lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraluebbert authored Jan 8, 2024
1 parent 08df5a1 commit a35a162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gget/gget_elm.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def regex_match(sequence):

# Compare ELM regex with input sequence and return all matching elms
for elm_id, pattern in zip(elm_ids, regex_patterns):
regex_matches = re.finditer(pattern, sequence)
regex_matches = re.finditer(f"(?=({pattern}))", sequence)

for match_string in regex_matches:
elm_row = df_elm_classes[df_elm_classes["Accession"] == elm_id]
Expand Down

0 comments on commit a35a162

Please sign in to comment.