NAME
Bio::MAGETAB::Util::Reader - A parser/validator for MAGE-TAB documents.
SYNOPSIS
use Bio::MAGETAB::Util::Reader;
my $reader = Bio::MAGETAB::Util::Reader->new({
idf => $idf,
relaxed_parser => $is_relaxed,
});
my $magetab = $reader->parse();
DESCRIPTION
This is the main parsing and validation class which can be used to read a MAGE-TAB document into a set of Bio::MAGETAB classes for further manipulation.
ATTRIBUTES
- idf
-
A filesystem or URI path to the top-level IDF file describing the investigation. This attribute is *required*.
- relaxed_parser
-
A boolean value (default FALSE) indicating whether or not the parse should take place in "relaxed mode" or not. The regular parsing mode will throw an exception in cases where an object is referenced before it has been declared (e.g., Protocol REF pointing to a non-existent Protocol Name). Relaxed parsing mode will silently autogenerate the non-existent objects instead.
- namespace
-
An optional namespace string to be used in object creation.
-
An optional authority string to be used in object creation.
- builder
-
An optional Builder object. These Builder objects are used to track the creation of Bio::MAGETAB objects by caching the objects in an internal store, keyed by a set of identifying information (see Bio::MAGETAB::Util::Builder). This object can be used in multiple Reader objects to help link common objects from multiple MAGE-TAB documents together. In its simplest form this internal store is a simple hash; however in principle this could be extended by subclassing Builder to create e.g. persistent database storage mechanisms.
METHODS
- parse
-
Attempts to parse the full MAGE-TAB document, starting with the top-level IDF file, and returns the resulting Bio::MAGETAB container object in scalar context, or the top-level Bio::MAGETAB::Investigation object and container object in list context.
SEE ALSO
AUTHOR
Tim F. Rayner <tfrayner@gmail.com>
LICENSE
This library is released under version 2 of the GNU General Public License (GPL).