Bioinformatics Research Unit > Software > BioParser Project > Documentation

Bio::Parser:Homologene::RDParser    v1.7

^ NAME

Bio::Parser:Homologene::RDParser - Recursive Descent Parser for Homologene

^ SYNOPSIS

  use Bio::Parser::Homologene::RDParser;
  my $parser = Bio::Parser::Homologene::RDParser->new();
  my $structure = $parser->parse( $homoltext );
  defined($structure) || die "Parsing appeared to fail.";

^ DESCRIPTION

This module takes a text scalar that contains a single record from NCBI's Homologene Database and returns an object containing all of the data. It can be used standalone but is really intended for use by the Bio::Parser::Homologene::FileParser module which iterates through a composite Homologene file one record at a time.

It can take 10-15 seconds to initialize this module so you should try to avoid instantiating it multiple times. It's intended to be used as a factory module to parse multiple records so instantiate it once and pass it around if necessary.

This module is an application of Damian Conway's wonderful Parse::RecDescent module. If you have a complicated text object to be teased apart, look no further than Parse::RecDescent.

^ PUBLIC METHODS

new()

Creates a new parser object. Reads the grammar from within the module itself (after __DATA__).

parse()

The Homologene record must exist as a single text block. The text block cannot contain multiple records or the parser will drop dead. If you have multiple records to parse, it's your responsibility to do the initial cutting and just pass a single record at a time to the parse() method. This is what the Bio::Parser::Homologene::FileParser module was designed to do.

^ SEE ALSO

^ AUTHORS

^ VERSION

$Id: RDParser.pm,v 1.7 2007/08/16 06:41:18 jpearson Exp $

^ COPYRIGHT

BioParser is copyright 2005 by The Translational Genomics Research Institute. All rights reserved. This License is limited to, and you may use the Software solely for, your own internal and non-commercial use for academic and research purposes. Without limiting the foregoing, you may not use the Software as part of, or in any way in connection with the production, marketing, sale or support of any commercial product or service or for any governmental purposes. For commercial or governmental use, please contact licensing@tgen.org. By installing this Software you are agreeing to the terms of the LICENSE file distributed with this software.

In any work or product derived from the use of this Software, proper attribution of the authors as the source of the software or data must be made. The following URL should be cited:

http://bioinformatics.tgen.org/software/bioparser/