Created
April 8, 2019 08:00
-
-
Save StephenFordham/85e51dd8ab26eaf961478d6d05aa5003 to your computer and use it in GitHub Desktop.
Character_groups_example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
N_glycosylation_pattern = 'N[^P][ST][^P]' | |
# putting a caret ^ at the start of the group will negate it | |
# and match any character that is not in that group | |
Protein_seq = 'YHWKYELIQNNSNEFC' | |
if re.search(N_glycosylation_pattern, Protein_seq): | |
print("N-glycosylation site motif found") | |
else: | |
print("No motif found") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment