Question: Parsing fasta file using seqIO
0
gravatar for jayasrivatsava
16 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 16 months ago by jrj.healey11k • written 16 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 16 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 16 months ago by WouterDeCoster37k

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

ADD REPLYlink modified 16 months ago • written 16 months ago by Peter5.8k
2
gravatar for jrj.healey
16 months ago by
jrj.healey11k
United Kingdom
jrj.healey11k 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 16 months ago by jrj.healey11k
0
gravatar for Hussain Ather
16 months ago by
Hussain Ather910
National Institutes of Health, Bethesda, MD
Hussain Ather910 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 16 months ago by Hussain Ather910
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: 1612 users visited in the last hour