NAME

Bio::Chaos              - utility class for handling Chaos-XML
 

SYNOPSIS

use Bio::Chaos;
my $C = Bio::Chaos->new;
$C->parse('test.gff');
$C->set_organism('Drosophila melanogaster');
print $C->transform_to('chadoxml')->xml;

DESCRIPTION

This module contains some basic methods for manipulating a Chaos-XML document stored in memory as a Data::Stag tree. This class is fairly minimal. One of the principal ideas being Bio::Chaos is that access to the data model should be directly through generic XML-based data accessors, such as those provided by Data::Stag

For more advanced functionality, see Bio::Chaos::ChaosGraph - this augments the generic accessor methods with some sequence feature semantics, and methods for graph traversal, location transformation etc

root

Usage   - my $cx = $C->root;
Returns - L<Data::Stag> chaos node
Args    -

returns the top-level of the Chaos-XML document as a stag tree

parse

Usage   - my $cx = $C->parse('sample_data/Rab1.chaos');
Usage   - my $cx = $C->parse('t/data/AE003744.gbk','genbank');
Usage   - my $cx = $C->parse('t/data/test.chado','chado');
Usage   - my $cx = $C->parse('t/data/foo.gff','gff3');
Returns - L<Data::Stag> chaos node
Args    - file str
          format str

parses from various formats into an in-memory chaos-xml file

see Bio::Chaos::Parser for details of the parsing architecture

transform_to

Usage   - $C->transform_to('chadoxml');
Returns -
Args    - fmt str

applies a transformation to the chaos node in memory

set_organism

Usage   - $C->set_organism('Drosophila melanogaster')
Returns -
Args    - org str

Sets organism_id for ALL features in the document

new_feature

Usage   - my $f = Data::Stag->new_feature
Returns - L<Data::Stag> feature node
Args    -