Bio::SeqIO flybase_chadoxml
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::SeqIO::flybase_chadoxml - FlyBase variant of chadoxml with sequence output stream
Package variables
No package variables defined.
Inherit
Bio::SeqIO::chadoxml
Synopsis
It is probably best not to use this object directly, but
rather go through the SeqIO handler system:
    $writer = Bio::SeqIO->new(-file => ">chado.xml",
-format => 'flybase_chadoxml');
# assume you already have Sequence or SeqFeature objects $writer->write_seq($seq_obj); #after writing all seqs $writer->close_chadoxml();
Description
This is a simple subclass of Bio::SeqIO::chadoxml; please see
its documentation for details.
Methods
_initialize
No description
Code
return_ftype_hashDescriptionCode
return_reltypenameDescriptionCode
write_seqDescriptionCode
Methods description
return_ftype_hashcode    nextTop
 Title    : return_ftype_hash
Usage : $obj->return_ftype_hash()
Function : A simple hash where returning it has be factored out of the main
code to allow subclasses to override it.
Returns : A hash that indicates what the name of the SO term is and what
the name of the Sequence Ontology is in the cv table.
Args : The string that represents the SO term.
Status :
return_reltypenamecodeprevnextTop
 Title    : return_reltypename
Usage : $obj->return_reltypename
Function : Return the appropriate relationship type name depending on the
feature type (typically part_of, but derives_from for polypeptide).
Returns : A relationship type name.
Args : A SO type name.
Status :
write_seqcodeprevnextTop
 Title   : write_seq
Usage : $stream->write_seq(-seq=>$seq, -seq_so_type=>$seqSOtype,
-src_feature=>$srcfeature,
-src_feat_type=>$srcfeattype,
-nounflatten=>0 or 1,
-is_analysis=>'true' or 'false',
-data_source=>$datasource)
Function: writes the $seq object (must be seq) into chadoxml.
Returns : 1 for success and 0 for error
Args : A Bio::Seq object $seq, optional $seqSOtype, $srcfeature,
$srcfeattype, $nounflatten, $is_analysis and $data_source.
Overrides Bio::SeqIO::chadoxml's write_seq method just to add an internal
close_chadoxml (mimics original use by FlyBase).
Methods code
_initializedescriptionprevnextTop
sub _initialize {
    my($self,%args) = @_;
    $self->SUPER::_initialize(%args);

    #default for standard chado is polypeptide
$Bio::SeqIO::chadoxml::feattype_args2so{'CDS'} = 'protein'; $Bio::SeqIO::chadoxml::cv_name{'sequence'} = 'SO'; $Bio::SeqIO::chadoxml::cv_name{'relationship'} = 'relationship type'; $Bio::SeqIO::chadoxml::cv_name{'feature_property'} = 'property type'; return;
}
return_ftype_hashdescriptionprevnextTop
sub return_ftype_hash {
    my $self  = shift;
    my $ftype = shift;
    my %ftype_hash = ( "name" => $ftype,
                       "cv_id" => {"name" => $Bio::SeqIO::chadoxml::cv_name{'sequence'} });
    return %ftype_hash;
}
return_reltypenamedescriptionprevnextTop
sub return_reltypename {
    my $self   = shift;
    my $sftype = shift;

    my $reltypename;
    if ($sftype eq 'protein' || $sftype eq 'polypeptide') {
        $reltypename = 'producedby';
    } else {
        $reltypename = 'partof';
    }

    return $reltypename;
}
write_seqdescriptionprevnextTop
sub write_seq {
    my ($self, @argv) = @_;

    $self->SUPER::write_seq(@argv);

    $self->close_chadoxml;
    return 1;
}


1;
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to one
of the Bioperl mailing lists. Your participation is much appreciated.
  bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support Top
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution.
Bug reports can be submitted via the web:
  https://redmine.open-bio.org/projects/bioperl/
AUTHOR - Peili ZhangTop
Email peili@morgan.harvard.edu
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _