This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can we use JELLYFISH for amino acid seqeunces?

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 genome sequencing

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.

1 answer

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))

Log in to answer this question.