Question: Parsing fasta file using seqIO
0
gravatar for jayasrivatsava
23 months ago by
India/Mumbai/IIT Bombay
jayasrivatsava0 wrote:

How to check if a multiple sequence file is in fasta format while parsing using seqIO

ADD COMMENTlink modified 23 months ago by Joe14k • written 23 months ago by jayasrivatsava0

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!

ADD REPLYlink written 23 months ago by jayasrivatsava0
1

Please use ADD COMMENT or ADD 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.

ADD REPLYlink written 23 months ago by WouterDeCoster41k

BioPerl's SeqIO? Biopython's SeqIO? Some other seqIO? (Only clear from the tags you've added)

ADD REPLYlink modified 23 months ago • written 23 months ago by Peter5.8k
2
gravatar for Joe
23 months ago by
Joe14k
United Kingdom
Joe14k wrote:

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

ADD COMMENTlink written 23 months ago by Joe14k
0
gravatar for Hussain Ather
23 months ago by
Hussain Ather940
National Institutes of Health, Bethesda, MD
Hussain Ather940 wrote:

It looks like this question has been asked before. Here's a response in Perl A: Check If A File Is In Fasta Format

ADD COMMENTlink written 23 months ago by Hussain Ather940
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 711 users visited in the last hour