Bio::SeqIO::game::gameWriter(3pm) | User Contributed Perl Documentation | Bio::SeqIO::game::gameWriter(3pm) |
Bio::SeqIO::game::gameWriter -- a class for writing game-XML
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 object my $seq = $in->next_seq; #write it in GAME format $out->write_seq($seq);
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.
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
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.
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
Email mckays@cshl.edu
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : new Usage : my $writer = Bio::SeqIO::game::gameWriter->new($seq); Function: constructor method for gameWriter Returns : a game writer object Args : a Bio::SeqI implementing object optionally, an argument to set map_position to on. ( map => 1 ). This will create a map_position elemant that will cause the feature coordinates to be remapped to a parent seqeunce. A sequence name in the format seq:xxx-xxx is expected to determine the offset for the map_position. The default behavior is to have features mapped relative to the sequence contained in the GAME-XML file
Title : write_to_game Usage : $writer->write_to_game Function: writes the sequence object to game-XML Returns : xml as a multiline string Args : none
Title : _rearrange_hierarchies Usage : $self->_rearrange_hierarchies($seq) Function: internal method to rearrange gene containment hierarchies so that snRNA or transposon features contain their genes rather than the other way around Returns : nothing Args : a Bio::RichSeq object Note : Not currently used, may be removed
Title : _write_feature Usage : $seld->_write_feature($feat, 1) Function: internal method for writing generic features as <annotation> elements Returns : nothing Args : a Bio::SeqFeature::Generic object and an optional flag to write a bare feature set with no annotation wrapper
Title : _write_gene Usage : $self->_write_gene($feature) Function: internal method for rendering gene containment hierarchies into a nested <annotation> element Returns : nothing Args : a nested Bio::SeqFeature::Generic gene feature Note : A nested gene hierarchy (gene->mRNA->CDS->exon) is expected. If other gene subfeatures 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
Title : _check_cds Usage : $self->_check_cds($cds, $name) Function: internal method to check if the CDS associated with an mRNA is the correct alternative splice variant Returns : a Bio::SeqFeature::Generic CDS object Args : the CDS object plus the transcript\'s 'standard_name' Note : this method only works if alternatively spliced transcripts are bound together 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 CDS with no associated mRNA feature. Neither of these two cases would be confounded by alternative splice variants.
Usage: Desc : Ret : Args : Side Effects: Example:
Usage: Desc : recursively render a feature and its subfeatures as <result_set> and <result_span> elements Ret : nothing meaningful Args : a feature
Usage: _comp_result_span('foo12',$feature); Desc : write GAME XML for a Bio::SeqFeature::Computation feature that has no subfeatures Ret : nothing meaningful Args : name for this span (some kind of identifier), SeqFeature object to put into this span Side Effects: Example:
Usage: Desc : Ret : Args : Side Effects: Example:
Usage: Desc : print out <output> elements, with contents taken from the SeqFeature::Computation's 'output' tag Ret : array of tag names this did not render Args : feature object, list of tag names to maybe render In game xml, only <result_span> and <result_set> elements can have <output> elements.
Usage: Desc : Ret : empty array Args : feature object, array of tag names Side Effects: Example: In game xml, <annotation>, <computational_analysis>, and <feature_set> elements can have properties.
Usage: Desc : Ret : names of tags that were not comment tags Args : feature object, tag names available for us to render Side Effects: writes XML Example: In game xml, <annotation> and <feature_set> elements can have comments.
Usage: Desc : Ret : names of tags that were not date tags Args : feature, list of tag names available for us to render Side Effects: writes XML for <date> elements Example: In game xml, <annotation>, <computational_analysis>, <transaction>, <comment>, and <feature_set> elements can have <date>s.
Desc : look for xref tags and render them if they are there Ret : tag names that we didn't render Args : feature object, list of tag names to render Side Effects: writes a <dbxref> element if a tag with name matching /xref$/i is present In game xml, <annotation> and <seq> elements can have dbxrefs.
Usage: Desc : process any 'Target' tags that would indicate a sequence alignment subject Ret : array of tag names that we didn't render Args : feature object Side Effects: writes a <seq_relationship> of type 'subject' if it finds any 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.
Title : _property Usage : $self->_property($tag => $value); Function: an internal method to write property XML elements Returns : nothing Args : a tag/value pair
Title : _unflatten_attribute Usage : $self->_unflatten_attribute($name, $value) Function: an internal method to unflatten and write comment or evidence elements Returns : nothing Args : a list of strings
Title : _xref Usage : $self->_xref($value) Function: an internal method to write db_xref elements Returns : nothing Args : a list of strings
Title : _feature_span Usage : $self->_feature_span($name, $type, $loc) Function: an internal method to write a feature_span element (the actual feature with coordinates) Returns : nothing Args : a feature name and Bio::SeqFeatureI-compliant object
Title : _seq_relationship Usage : $self->_seq_relationship($type, $loc) Function: an internal method to handle feature_span sequence relationships Returns : nothing Args : feature type, a Bio::LocationI-compliant object, (optional) sequence name (defaults to the query seq) and (optional) alignment string
Title : _element Usage : $self->_element($name, $chars, $atts) Function: an internal method to generate 'generic' XML elements Example : my $name = 'foo'; my $content = 'bar'; my $attributes = { baz => 1 }; # print the element $self->_element($name, $content, $attributes); Returns : nothing Args : the element name and content plus a ref to an attribute hash
Title : _span Usage : $self->_span($loc) Function: an internal method to write the 'span' element Returns : nothing Args : a Bio::LocationI-compliant object
Title : _seq Usage : $self->_seq($seq, $dna) Function: an internal method to print the 'sequence' element Returns : nothing Args : and Bio::SeqI-compliant object and a reference to an attribute hash
Title : _find_name Usage : my $name = $self->_find_name($feature) Function: an internal method to look for a gene name Returns : a string Args : a Bio::SeqFeatureI-compliant object
2021-08-15 | perl v5.32.1 |