NAME
Bio::SeqIO::game::gameWriter -- a class for writing game-XML
SYNOPSIS
use Bio::SeqIO;my $in = Bio::SeqIO->new( -format => 'genbank',-file => 'myfile.gbk' );my $out = Bio::SeqIO->new( -format => 'game',-file => 'myfile.xml' );# get a sequence objectmy $seq = $in->next_seq;#write it in GAME format$out->write_seq($seq);
DESCRIPTION
Bio::SeqIO::game::gameWriter writes GAME-XML (v. 1.2) that is readable by Apollo. It is best not used directly. It is accessed via Bio::SeqIO.
FEEDBACK
Mailing Lists
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
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 Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Sheldon McKay
Email [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $writer = Bio::SeqIO::game::gameWriter->new($seq);Function: constructor method for gameWriterReturns : a game writer objectArgs : a Bio::SeqI implementing objectoptionally, an argument to set map_position to on.( map => 1 ). This will create a map_position elemantthat will cause the feature coordinates to be remapped toa parent seqeunce. A sequence name in the format seq:xxx-xxxis expected to determine the offset for the map_position.The default behavior is to have features mapped relative tothe sequence contained in the GAME-XML file
write_to_game
Title : write_to_gameUsage : $writer->write_to_gameFunction: writes the sequence object to game-XMLReturns : xml as a multiline stringArgs : none
_rearrange_hierarchies
Title : _rearrange_hierarchiesUsage : $self->_rearrange_hierarchies($seq)Function: internal method to rearrange gene containment hierarchiesso that snRNA or transposon features contain their genesrather than the other way aroundReturns : nothingArgs : a Bio::RichSeq objectNote : Not currently used, may be removed
_write_feature
Title : _write_featureUsage : $seld->_write_feature($feat, 1)Function: internal method for writing generic features as <annotation> elementsReturns : nothingArgs : a Bio::SeqFeature::Generic object and an optional flag to write abare feature set with no annotation wrapper
_write_gene
Title : _write_geneUsage : $self->_write_gene($feature)Function: internal method for rendering gene containment hierarchies intoa nested <annotation> elementReturns : nothingArgs : a nested Bio::SeqFeature::Generic gene featureNote : A nested gene hierarchy (gene->mRNA->CDS->exon) is expected. If other genesubfeatures occur as level one subfeatures (same level as mRNA subfeats)an attempt will be made to link them to transcripts via the 'standard_name'qualifier
_check_cds
Title : _check_cdsUsage : $self->_check_cds($cds, $name)Function: internal method to check if the CDS associated with an mRNA isthe correct alternative splice variantReturns : a Bio::SeqFeature::Generic CDS objectArgs : the CDS object plus the transcript\'s 'standard_name'Note : this method only works if alternatively spliced transcripts are boundtogether by a 'standard_name' or 'mRNA' qualifier. If none is present,we will hope that the exons were derived from a segmented RNA or a CDSwith no associated mRNA feature. Neither of these two cases would beconfounded by alternative splice variants.
_comp_analysis
Usage:Desc :Ret :Args :Side Effects:Example:
_comp_result
Usage:Desc : recursively render a feature and its subfeatures as<result_set> and <result_span> elementsRet : nothing meaningfulArgs : a feature
_comp_result_span
Usage: _comp_result_span('foo12',$feature);Desc : write GAME XML for a Bio::SeqFeature::Computation featurethat has no subfeaturesRet : nothing meaningfulArgs : name for this span (some kind of identifier),SeqFeature object to put into this spanSide Effects:Example:
_render_tags
Usage:Desc :Ret :Args :Side Effects:Example:
_render_output_tags
Usage:Desc : print out <output> elements, with contentstaken from the SeqFeature::Computation's 'output' tagRet : array of tag names this did not renderArgs : feature object, list of tag names to maybe renderIn game xml, only <result_span> and <result_set> elements canhave <output> elements.
_render_tags_as_properties
Usage:Desc :Ret : empty arrayArgs : feature object, array of tag namesSide Effects:Example:In game xml, <annotation>, <computational_analysis>,and <feature_set> elements can have properties.
_render_comment_tags
Usage:Desc :Ret : names of tags that were not comment tagsArgs : feature object, tag names available for us to renderSide Effects: writes XMLExample:In game xml, <annotation> and <feature_set> elements canhave comments.
_render_date_tags
Usage:Desc :Ret : names of tags that were not date tagsArgs : feature, list of tag names available for us to renderSide Effects: writes XML for <date> elementsExample:In game xml, <annotation>, <computational_analysis>,<transaction>, <comment>, and <feature_set> elementscan have <date>s.
_render_dbxref_tags
Desc : look for xref tags and render them if they are thereRet : tag names that we didn't renderArgs : feature object, list of tag names to renderSide Effects: writes a <dbxref> element if a tag with namematching /xref$/i is presentIn game xml, <annotation> and <seq> elements can have dbxrefs.
_render_target_tags
Usage:Desc : process any 'Target' tags that would indicate a sequence alignment subjectRet : array of tag names that we didn't renderArgs : feature objectSide Effects: writes a <seq_relationship> of type 'subject' if it findsany properly formed tags named 'Target'Example:In game xml, <result_span>, <feature_span>, and <result_set> can have<seq_relationship>s. <result_set> can only have one, a 'query' relation.
_property
Title : _propertyUsage : $self->_property($tag => $value);Function: an internal method to write property XML elementsReturns : nothingArgs : a tag/value pair
_unflatten_attribute
Title : _unflatten_attributeUsage : $self->_unflatten_attribute($name, $value)Function: an internal method to unflatten and write comment or evidence elementsReturns : nothingArgs : a list of strings
_xref
Title : _xrefUsage : $self->_xref($value)Function: an internal method to write db_xref elementsReturns : nothingArgs : a list of strings
_feature_span
Title : _feature_spanUsage : $self->_feature_span($name, $type, $loc)Function: an internal method to write a feature_span element(the actual feature with coordinates)Returns : nothingArgs : a feature name and Bio::SeqFeatureI-compliant object
_seq_relationship
Title : _seq_relationshipUsage : $self->_seq_relationship($type, $loc)Function: an internal method to handle feature_span sequence relationshipsReturns : nothingArgs : feature type, a Bio::LocationI-compliant object,(optional) sequence name (defaults to the query seq)and (optional) alignment string
_element
Title : _elementUsage : $self->_element($name, $chars, $atts)Function: an internal method to generate 'generic' XML elementsExample :my $name = 'foo';my $content = 'bar';my $attributes = { baz => 1 };# print the element$self->_element($name, $content, $attributes);Returns : nothingArgs : the element name and content plus a ref to an attribute hash
_span
Title : _spanUsage : $self->_span($loc)Function: an internal method to write the 'span' elementReturns : nothingArgs : a Bio::LocationI-compliant object
_seq
Title : _seqUsage : $self->_seq($seq, $dna)Function: an internal method to print the 'sequence' elementReturns : nothingArgs : and Bio::SeqI-compliant object and a reference to an attribute hash
_find_name
Title : _find_nameUsage : my $name = $self->_find_name($feature)Function: an internal method to look for a gene nameReturns : a stringArgs : a Bio::SeqFeatureI-compliant object