The prediction of functional sites (e.g. methylation) of proteins usually needs to split the total protein into a set of segments around specific amino acid. Given a specific window size p, we can obtain all segments of length equal to (2*p+1) very easily. Note that the output of the method is a list form.
Authors: Dongsheng Cao and Yizeng Liang. Date: 2012.9.2 Email: firstname.lastname@example.org
GetSubSequence(ProteinSequence: str, ToAA: str = 'S', window: int = 3) → List[str]¶
Get all 2*window+1 sub-sequences whose cener is ToAA in a protein.
- ProteinSequence (str) – a pure problem sequence
- ToAA (str) – the central (query point) amino acid in the sub-sequence
- window (int) – the span
result – contains all satisfied sub-sequences
>>> from propy.GetProteinFromUniprot import GetProteinSequence >>> protein = GetProteinSequence(ProteinID="Q9NQ39") >>> result = GetSubSequence(protein)