Problem: extract just the 255-aa protein kinase domains from a set of 70 sequences.
You don't really need to use the split() method; slicing the original sequence should do it once you've calculated the sequence coordinates.
If you're already parsing some of HMMer's plain-text output, you can look at the fields "hmmfrom" and "hmm to" to see how many positions are missing from the start and end of the sequence, then look at the "alifrom" and "ali to" fields to determine the positions of the original sequence that matched the HMM profile. Then, simple arithmetic to get the coordinates in the original sequence:
realstart = alifrom - hmmstart
realend = ali_to + (255 - hmm_to)
realdomain = rec_mine[realstart:realend]
The sequence coordinates of the aligned region also appear in the Stockholm output, in the sequence identifier after the slash character -- so you can also count the number of terminal dashes, minus any leading or trailing insert (lowercase) characters.
Keep in mind that for some purposes, the missing sequence positions might not be meaningful -- e.g. many biologically functional kinases are missing one or more subdomains, so the sequence portions that were left out by the HMM profile could be phylogenetically or structurally unrelated to the typical kinase subdomain. Though if the missing portions are only 3-4 aa I think you're fine, it's just HMMer being stubborn.
UniProt is a repository of proteins, not domains (though SMART/PFAM/...) may be linked. So please clarify this part. Can't you use the full domains from the source dbs once you have identified them?
yes but we just need the domains not the whole sequences extracting it with the ids is painful,i m trying to write some code that can do this.