Entering edit mode
7.0 years ago
jayasrivatsava
•
0
How to check if a multiple sequence file is in fasta format while parsing using seqIO
How to check if a multiple sequence file is in fasta format while parsing using seqIO
You can’t really use SeqIO
to check if the sequences are in fasta format, since SeqIO
requires you to tell it that information when you read a file in (other than assuming its a FASTA, and waiting for it to fail if it isn’t).
It looks like this question has been asked before. Here's a response in Perl A: Check If A File Is In Fasta Format
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Hello
I have a multiple sequence file in fasta format.I am trying to parse sequences in python. All I need to check is the presence of '>' before every sequence. While this can be easily executed otherwise, I was hoping there would be a simpler option using SeqIO.parse. For now, if the sequences are not preceded by '>', I do not get any parsed output. thanks!
Please use
ADD COMMENT
orADD REPLY
to answer to previous reactions, as such this thread remains logically structured and easy to follow. I have now moved your post but as you can see it's not optimal. Adding an answer should only be used for providing a solution to the question asked.BioPerl's SeqIO? Biopython's SeqIO? Some other seqIO? (Only clear from the tags you've added)