Closed dy-lin closed 2 years ago
L213-214: created lists for length and charge
y_length = [] y_charge = []
L232-236: added length and charge calculation (valid sequences)
# calculate charge y_charge.append(peptide[ix].count('K') + peptide[ix].count('R') - peptide[ix].count('D') - peptide[ix].count('E')) # calculate length y_length.append(len(peptide[ix]))
L244-245: Length and charge for invalid sequences
y_charge.append('NA') y_length.append('NA')
L250: Add length and charge to output txt
temp_txt = 'Sequence ID: '+seq_id[i]+'\n'+'Sequence: '+peptide[i]+'\n' \ + 'Length: ' + str(y_length[i]) + '\n' + 'Charge: ' + str(y_charge[i]) + '\n' \ +'Probability_score: '+str(y_score[i])+'\n'+'AMPlify_log_scaled_score: ' \ +str(y_log_score[i])+'\n'+'Prediction: '+y_class[i]+'\n'
L280-281, L289-290 : Add length and charge to output tsv/xlsx
if args.attention == 'on': out = pd.DataFrame({'Sequence_ID':seq_id, 'Sequence': peptide, 'Length': y_length, 'Charge': y_charge, 'Probability_score': y_score, 'AMPlify_log_scaled_score': y_log_score, 'Prediction': y_class, 'Attention': attention}) else: out = pd.DataFrame({'Sequence_ID':seq_id, 'Sequence': peptide, 'Length': y_length, 'Charge': y_charge, 'Probability_score': y_score, 'AMPlify_log_scaled_score': y_log_score, 'Prediction': y_class})
Other edits appear to be my text editor adding some eol characters?
L213-214: created lists for length and charge
L232-236: added length and charge calculation (valid sequences)
L244-245: Length and charge for invalid sequences
L250: Add length and charge to output txt
L280-281, L289-290 : Add length and charge to output tsv/xlsx
Other edits appear to be my text editor adding some eol characters?