peptides.py
peptides.py copied to clipboard
RuntimeWarning in auto_correlation function()
Hi, thank you for creating peptides.py.
Some hydrophobicity tables together with certain proteins cause a runtime warning for in the function auto_correlation():
import peptides
for hydro in peptides.tables.HYDROPHOBICITY.keys():
print(hydro)
table = peptides.tables.HYDROPHOBICITY[hydro]
peptides.Peptide('MANTQNISIWWWAR').auto_correlation(table)
Warning (s2 == 0):
RuntimeWarning: invalid value encountered in double_scalars
return s1 / s2
The tables concerned are: octanolScale_pH2, interfaceScale_pH2, oiScale_pH2
Some other proteins causing the same warning:
['MSYGGSCAGFGGGFALLIVLFILLIIIGCSCWGGGGYGY', 'MFILLIIIGASCFGGGGGCGYGGYGGYAGGYGGYCC', 'MSFGGSCAGFGGGFALLIVLFILLIIIGCSCWGGGGGF']