Package: peptides
peptides.pyPhysicochemical properties, indices and descriptors for amino-acid sequences.🗺️ Overviewpeptides.pyis a pure-Python package to compute common descriptors for
protein sequences. It started as a port ofPeptides, the R package written byDaniel Osorio, but now also provides
some additional features fromEMBOSS,ExPASy Protein Identification and Analysis Tools, andRcpi.This library has no external dependency and is available for all modern Python
versions (3.6+).📋 FeaturesA non-exhaustive list of available features:Peptide statistics: amino acid counts and frequencies.QSARdescriptors: BLOSUM indices, Cruciani properties, FASGAI vectors, Kidera factors, MS-WHIM scores, PCP descriptors, ProtFP descriptors, Sneath vectors, ST-scales, T-scales, VHSE-scales, Z-scales.Sequence profiles: hydrophobicity, hydrophobic moment, membrane position.Physicochemical properties: aliphatic index, instability index, theoretical net charge, isoelectric point, molecular weight (with isotope labelling support).Biological properties: structural class prediction.If this library is missing a useful statistic or descriptor, feel free to
reach out and open a feature request on theissue trackerof theproject repository.🧊 VectorizationMost of the descriptors for a protein sequence are simple averages of values
taken in a lookup table, so computing them can be done in a vectorized manner.
Ifnumpycan be imported, relevant functions
(likenumpy.sumornumpy.take) will be used, otherwise a fallback
implementation usingarray.arrayfrom the standard library is available.🔧 InstallingInstall thepeptidespackage directly fromPyPiwhich hosts universal wheels that can be installed withpip:$pipinstallpeptides📖 DocumentationA completeAPI referencecan be found in theonline documentation,
or directly from the command line usingpydoc:$pydocpeptides.Peptide💡 ExampleStart by creating aPeptideobject from a protein sequence:>>>importpeptides>>>peptide=peptides.Peptide("MLKKRFLGALAVATLLTLSFGTPVMAQSGSAVFTNEGVTPFAISYPGGGT")Then use the appropriate methods to compute the descriptors you want:>>>peptide.aliphatic_index()89.8...>>>peptide.boman()-0.2097...>>>peptide.charge(pH=7.4)1.99199...>>>peptide.isoelectric_point()10.2436...Methods that return more than one scalar value (for instance,Peptide.blosum_indices)
will return a dedicated named tuple:>>>peptide.ms_whim_scores()MSWHIMScores(mswhim1=-0.436399...,mswhim2=0.4916...,mswhim3=-0.49200...)Use thePeptide.descriptorsmethod to get a dictionary with every available
descriptor. This makes it very easy to create apandas.DataFramewith
descriptors for several protein sequences:>>>seqs=["SDKEVDEVDAALSDLEITLE","ARQQNLFINFCLILIFLLLI","EGVNDNECEGFFSAR"]>>>df=pandas.DataFrame([peptides.Peptide(s).descriptors()forsinseqs])>>>dfBLOSUM1BLOSUM2BLOSUM3BLOSUM4...Z2Z3Z4Z500.367000-0.436000-0.2390.014500...-0.711000-0.104500-1.4865000.4295001-0.697500-0.372500-0.4930.157000...-0.307500-0.627500-0.4505000.36200020.479333-0.0013330.1380.228667...-0.2993330.465333-0.9766670.023333[3rowsx66columns]💭 Feedback⚠️ Issue TrackerFound a bug ? Have an enhancement request ? Head over to theGitHub issue
trackerif you need to report
or ask something. If you are filing in on a bug, please include as much
information as you can about the issue, and try to recreate the same bug
in a simple, easily reproducible situation.🏗️ ContributingContributions are more than welcome! SeeCONTRIBUTING.mdfor more details.⚖️ LicenseThis library is provided under theGNU General Public License v3.0.
The original RPeptidespackage was written byDaniel Osorio,Paola Rondón-VillarrealandRodrigo Torres, and is licensed under
the terms of theGNU General Public License v2.0.
TheEMBOSSapplications are
released under theGNU General Public License v1.0.This project is in no way not affiliated, sponsored, or otherwise endorsed
by theoriginalPeptidesauthors. It was developed
byMartin Larraldeduring his PhD project
at theEuropean Molecular Biology Laboratoryin
theZeller team.