[Bioperl-l] verify format

Scott Markel SMarkel at accelrys.com
Wed Jul 15 15:23:33 UTC 2009


tkd,

See http://www.bioperl.org/wiki/HOWTO:Beginners#Retrieving_a_sequence_from_a_file
for examples of how to read files using BioPerl.  FASTA is one of the supported
formats.

Once you have a sequence object, e.g., after a line like

$seq_obj = $seqio_obj->next_seq;

you can use $seq_obj->alphabet to see if the sequence is "dna", "rna",
or "protein".  

Note that this check is per sequence.  There's no guarantee that all
sequences in a FASTA file are of a single type.

See http://www.bioperl.org/wiki/HOWTO:Beginners#The_Sequence_Object
for other methods that can be called on a sequence object.

Scott

Scott Markel, Ph.D.
Principal Bioinformatics Architect  email:  smarkel at accelrys.com
Accelrys (SciTegic R&D)             mobile: +1 858 205 3653
10188 Telesis Court, Suite 100      voice:  +1 858 799 5603
San Diego, CA 92121                 fax:    +1 858 799 5222
USA                                 web:    http://www.accelrys.com

http://www.linkedin.com/in/smarkel
Vice President, Board of Directors:
    International Society for Computational Biology
Co-chair: ISCB Publications Committee
Associate Editor: PLoS Computational Biology
Editorial Board: Briefings in Bioinformatics


> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of tkd
> Sent: Wednesday, 15 July 2009 5:02 AM
> To: bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] verify format
> 
> Hi,
> 
> I'm computer scientist and I'm new in the bioinformatics world, and
> bioperl ...
> 
> I have a small problem :
> 
> I have a file, which has to be in FASTA format, but it could be wrong.
> So, I need :
> - to verify if my file is well-written in fasta format
> - to verify is the content of the fasta file is protein OR nucloetides
> 
> I think there surely exists someting in bioperl to that but I didn't
> find anything.
> 
> Thank for your help
> 
> tkd
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list