Skip to content

Commit e09292e

Browse files
mark0428mark0428
authored andcommitted
grammar correction and reformatting
1 parent 56121b1 commit e09292e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Datasets for training and testing are stored in the `data` folder. Please specif
5050

5151
### User-Specified Data:
5252

53-
AMPlify only accepts 20 standard amino acids. However, if the user specifies the stop codon with adding a asterisk character to the end of the peptide sequences, AMPlify would ignore the last character of the peptides and allow them to be participate in the training or inference stages.
53+
AMPlify only accepts the 20 standard amino acids. However, if the user specifies a stop codon by adding an asterisk character to the end of a peptide sequence, AMPlify will ignore the last character and allow the peptide to participate in the training or inference stage.
5454

5555
### Pre-trained sub-models
5656

src/AMPlify.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ def main():
200200
valid_ix = []
201201
for i in range(len(peptide)):
202202
if len(peptide[i]) <= 200 and len(peptide[i]) >= 2:
203-
if set(peptide[i])-set(aa) == set() or (set(peptide[i][:-1])-set(aa)==set() and peptide[i][-1]=='*'): # either does not contain nonstandard amino acids or the last character is '*'
203+
if set(peptide[i])-set(aa) == set() or (set(peptide[i][:-1])-set(aa) == set() and peptide[i][-1] == '*'):
204+
# either does not contain nonstandard amino acids or the last character is '*'
204205
valid_ix.append(i)
205206

206207
# select valid sequences for prediction
207-
peptide_valid = [peptide[i] if peptide[i][-1]!="*" else peptide[i][:-1] for i in valid_ix]
208+
peptide_valid = [peptide[i] if peptide[i][-1] != '*' else peptide[i][:-1] for i in valid_ix]
208209

209210
# generate one-hot encoding input and pad sequences into MAX_LEN long
210211
X_seq_valid = one_hot_padding(peptide_valid, MAX_LEN)

0 commit comments

Comments
 (0)