Thank you for your quick reply!
• 0 views
•
link
I have a very large file of 1000's of amino acid sequences. I would like to identify ALL overlapping k-mers.
I was hoping to use JELLYFISH, but it only seems to work with nucleic acid sequences. Is there any way to use the tool to read and parse the fasta file of amino acids?
Jellyfish cannot deal with the protein sequences. You can use skbio iter_kmers() for this. BioPython solution:
from Bio import SeqIO
from skbio import Sequence
myfile=SeqIO.parse('test.fa','fasta')
for record in myfile:
sequence=Sequence(str(record.seq))
for kmer in sequence.iter_kmers(4, overlap=True):
print(str(kmer))
Thank you for your quick reply!
Log in to answer this question.
This is a question; you're not posting about a tool. I've made the required change now, please be more careful in the future.