Skip to content

Commit 6c946f1

Browse files
Merge pull request #22 from SynBioDex/taya-test
changed the sequence and proteinSequence functions to make all sequences upper case no matter the input format
2 parents 7a1065e + 656d11f commit 6c946f1

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.DS_Store

0 Bytes
Binary file not shown.

excelutils/.DS_Store

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

excelutils/excel_sbol_utils/library2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,9 @@ def sequence(rowobj):
982982
elif re.match(r'^[a-zA-Z \s*]+$', val):
983983
# if a sequence string
984984

985-
# removes spaces, enters, and makes all lower case
985+
# removes spaces, enters, and makes all upper case
986986
val = "".join(val.split())
987-
val = val.replace(u"\ufeff", "").lower()
987+
val = val.replace(u"\ufeff", "").upper()
988988

989989
uri = f'{url}/search/sequence={val}&'
990990
if data["Domain"].strip() == "":
@@ -1042,10 +1042,10 @@ def proteinSequence(rowobj):
10421042
return
10431043
rowobj.obj.sequences = [val]
10441044

1045-
elif re.match(r'^[ACDEFGHIKLMNPQRSTVWY\s*]+$', val):
1045+
elif re.match(r'^[ACDEFGHIKLMNPQRSTVWYacdefghiklmnpqrstvwy\s*]+$', val):
10461046
# if a sequence string
10471047

1048-
# removes spaces, enters, and makes all lower case
1048+
# removes spaces, enters, and makes all upper case
10491049
val = "".join(val.split())
10501050
# removes *
10511051
val = val.replace('*', '')
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
user_input = " Hello "
2+
cleaned_input = user_input.strip()
3+
print(f"Original input: '{user_input}'")
4+
print(f"Cleaned input: '{cleaned_input}'")

0 commit comments

Comments
 (0)