In this article, we are going to learn how python can be useful in finding amino acid in a given protein sequence. Before reading this article you must know about FASTA format and single letter code for the amino acid. (Click here FASTA format)
Here, we will learn how can we find the total length of a sequence and find the number of the specific amino acid in a sequence. For finding the FASTA format of a protein you can use NCBI, UniProt, or protein data bank (RSCB).
Example: The given sequence of amino acid is:
>sp|Q14533|KRT81_HUMAN Keratin, type II cuticular Hb1 OS=Homo sapiens OX=9606 GN=KRT81 PE=1 SV=3
MTCGSGFGGRAFSCISACGPRPGRCCITAAPYRGISCYRGLTGGFGSHSVCGGFRAGSCGRSFGYRSGGVCGPSPPCITTVSVNESLLTPLNLEIPNAQCVKQEEKEQIKSLNSRFAAFIDKVRFLEQQNKLLETKLQFYQNRECCQSNLEPLFEGYIETLRREAECVEADSGRLASELNHVQEVLEGYKKKYEEEVSLRATAENEFVALKKDVDCAYLRKSDLEANVEALIQEIDFLRRLYEEEILILQSHISDTSVVVKLDNSRDLNMDCIIAEIKAQYDDIVTRSRAEAESWYRSKCEEMKATVIRHGETLRRTKEEINELNRMIQRLTAEVENAKCQNSKLEAAVAQSEQQGEAALSDARCKLAELEGALQKAKQDMACLIREYQEVMNSKLGLDIEIATYRRLLEGEEQRLCEGIGAVNVCVSSSRGGVVCGDLCVSGSRPVTGSVCSAPCNGNVAVSTGLCAPCGQLNTTCGGGSCGVGSCGISSLGVGSCGSSCRKC
This is a fast sequence of HUMAN keratin (from UniProt) in this article we are working with a small segment of above FASTA.
Below is the Python code given for this:
# input sequence given_sequence = "MTCGSGFGGRAFSCISACGPRPGRCCITAAPYRGISCYRGLTGGFGSH" # length of given sequence total_amino_acid = len(given_sequence) # find count of 'M' in the given sequence # using count method of string MET_count= given_sequence.count('M') # find count of 'G' in the given sequence # using count method of string GLY_count = given_sequence.count('G') print('Total amino acid in the sequence are-->',total_amino_acid) print('Total MET in the sequence-->', MET_count) print('Total GLY in the sequence-->', GLY_count)
Output:
Total amino acid in the sequence are--> 48 Total MET in the sequence--> 1 Total GLY in the sequence--> 11
I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!
This is a appealing post by the way. I am going to go ahead and bookmark this post for my sister to check out later on tomorrow. Keep up the good quality work.