propy.GetSubSeq¶
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.
-
propy.GetSubSeq.
GetSubSequence
(ProteinSequence: str, ToAA: str = 'S', window: int = 3) → List[str][source]¶ Get all 2*window+1 sub-sequences whose cener is ToAA in a protein.
Parameters: - ProteinSequence (str) – a pure problem sequence
- ToAA (str) – the central (query point) amino acid in the sub-sequence
- window (int) – the span
Returns: result – contains all satisfied sub-sequences
Return type: List[str]
Examples
>>> from propy.GetProteinFromUniprot import GetProteinSequence >>> protein = GetProteinSequence(ProteinID="Q9NQ39") >>> result = GetSubSequence(protein)