Entering edit mode
3.0 years ago
devhimd
▴
10
if i have a fasta sequence and i want to trim the sequences based on the window size having Cys at the center and if the window size is less than the residue number i want it to fill it with some alphabet
>sp|P39688|FYN_MOUSE Tyrosine-protein kinase Fyn OS=Mus musculus OX=10090 GN=Fyn PE=1 SV=4
MGCVQCKDKEAAKLTEERDGSLNQSSGYRYGTDPTPQHYPSFGVTSIPNYNNFHAAGGQGLTVFGGVNSSSHTGTLRTRGGTGVTLFVALYDYEARTEDDLSFHKGEKFQILNSSEGDWWEARSLTTGETGYIPSNYVAPVDSIQAEEWYFGKLGRKDAERQLLSFGNPRGTFLIRESETTKGAYSLSIRDWDDMKGDHVKHYKIRKLDNGGYYITTRAQFETLQQLVQHYSERAAGLCCRLVVPCHKGMPRLTDLSVKTKDVWEIPRESLQLIKRLGNGQFGEVWMGTWNGNTKVAIKTLKPGTMSPESFLEEAQIMKKLKHDKLVQLYAVVSEEPIYIVTEYMSKGSLLDFLKDGEGRALKLPNLVDMAAQVAAGMAYIERMNYIHRDLRSANILVGNGLICKIADFGLARLIEDNEYTARQGAKFPIKWTAPEAALYGRFTIKSDVWSFGILLTELVTKGRVPYPGMNNREVLEQVERGYRMPCPQDCPISLHELMIHCWKKDPEERPTFEYLQGFLEDYFTATEPQYQPGENL
Cys_Residue = 3
window size = 2
I don't really understand the objective?
You want to find all cysteines at the centre of an amino acid triplet, and replace it with some random letter? Why?
I have an FASTA sequence with Cys residue no = 16 and window size = 5. I want to print if the residue number is less than the Cys residue print with some other alphabet
start = res number + window end = res number - window
start = 16+5 = 21 = sequence : 16,17,18,19,20,21 end = 16-5 = 11 = sequence: 11, 12, 13, 14, 15, 16
total sequence = 11,12,13,14,15,16,17,18,19,20,21
start = res number + window end = res number - window
start = 2+5 = 7 = sequence : 2,3,4,5,6,7 end = 2-5 = -3 = sequence : -3,-2,-1,0,1,2
total sequence = XXXXACFGHLP
write a python script
Unless you address these aspects, we will have to close this post.