diff --git a/rhapsody/features/Uniprot.py b/rhapsody/features/Uniprot.py index bbaad3c..9dd85e7 100644 --- a/rhapsody/features/Uniprot.py +++ b/rhapsody/features/Uniprot.py @@ -884,7 +884,7 @@ def seqScanning(Uniprot_coord, sequence=None): sequence will be downloaded from Uniprot. ''' assert isinstance(Uniprot_coord, str), "Must be a string." - coord = Uniprot_coord.strip().split() + coord = Uniprot_coord.upper().strip().split() assert len(coord) < 3, "Invalid format. Examples: 'Q9BW27' or 'Q9BW27 10'." aa_list = 'ACDEFGHIKLMNPQRSTVWY' if sequence is None: @@ -928,5 +928,5 @@ def printSAVlist(input_SAVs, filename): m = f'error in SAV {i}: ' assert isinstance(line, str), f'{m} not a string' assert len(line) < 25, f'{m} too many characters' - print(line, file=f) + print(line.upper(), file=f) return filename diff --git a/rhapsody/predict/core.py b/rhapsody/predict/core.py index d1d8051..1bf4897 100644 --- a/rhapsody/predict/core.py +++ b/rhapsody/predict/core.py @@ -193,18 +193,19 @@ def setSAVs(self, query): if isfile(query): # 'query' is a filename, with line format 'P17516 135 G E' SAVs = np.loadtxt(query, dtype=SAV_dtype) - SAV_list = ['{} {} {} {}'.format(*s) for s in SAVs] + SAV_list = ['{} {} {} {}'.format(*s).upper() for s in SAVs] elif len(query.split()) < 3: # single Uniprot acc (+ pos), e.g. 'P17516' or 'P17516 135' SAV_list = Uniprot.seqScanning(query) self.saturation_mutagenesis = True else: # single SAV - SAV = np.array(query.split(), dtype=SAV_dtype) + SAV = np.array(query.upper().split(), dtype=SAV_dtype) SAV_list = ['{} {} {} {}'.format(*SAV)] else: # 'query' is a list or tuple of SAV coordinates - SAVs = np.array([tuple(s.split()) for s in query], dtype=SAV_dtype) + SAVs = np.array([tuple(s.upper().split()) for s in query], + dtype=SAV_dtype) SAV_list = ['{} {} {} {}'.format(*s) for s in SAVs] # store SAV coordinates numSAVs = len(SAV_list)