Bio::S...Writer(3pm)
πΈ NAME πΈ
Bio::SeqIO::game::gameWriter β a whole entire class for writing game-XML. That's the name, that's the assignment, that's her. π
β¨ SYNOPSIS β¨
okay so here's the vibe, bestie, in literal code form:
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);
read in a genbank file, spit out a game xml file, grab a seq, write it. slay. π¦
π DESCRIPTION π
Bio::SeqIO::game::gameWriter writes GAME-XML (v. 1.2) that is readable by Apollo. iconic behavior honestly.
but listen β it is best not used directly. she's not the main character you call up yourself, she's accessed via Bio::SeqIO. iykyk. π«Ά
π FEEDBACK π
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules, no cap. Send your comments and suggestions preferably to one of the Bioperl mailing lists. π
Your participation is much appreciated. fr fr. π
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. There are so many experienced and responsive experts who 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 so we can 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 mckays@cshl.edu β shoutout to Sheldon, the icon who wrote her. π
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _. (that underscore is the "do not touch, she's internal" signal, bestie π§)
new
- Title:
new - Usage:
my $writer = Bio::SeqIO::game::gameWriter->new($seq); - Function: constructor method for gameWriter
- Returns: a game writer object
- Args: a
Bio::SeqIimplementing object. Optionally, an argument to setmap_positionto on (map => 1). This will create amap_positionelement that will cause the feature coordinates to be remapped to a parent sequence. A sequence name in the formatseq:xxx-xxxis expected to determine the offset for themap_position. The default behavior is to have features mapped relative to the sequence contained in the GAME-XML file.
write_to_game
- 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
_rearrange_hierarchies
- Title:
_rearrange_hierarchies - Usage:
$self->_rearrange_hierarchies($seq) - Function: internal method to rearrange gene containment hierarchies so that
snRNAortransposonfeatures contain their genes rather than the other way around - Returns: nothing
- Args: a
Bio::RichSeqobject - Note: Not currently used, may be removed π
_write_feature
- 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::Genericobject and an optional flag to write a bare feature set with no annotation wrapper
_write_gene
- 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::Genericgene 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
_check_cds
- 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::GenericCDS 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.
_comp_analysis
- Usage: (empty, bestie, nothing here π)
- Desc: (empty)
- Ret: (empty)
- Args: (empty)
- Side Effects: (empty)
- Example: (empty)
_comp_result
- Usage: (empty)
- Desc: recursively render a feature and its subfeatures as
<result_set>and<result_span>elements - Ret: nothing meaningful
- Args: a feature
_comp_result_span
- Usage:
_comp_result_span('foo12',$feature); - Desc: write GAME XML for a
Bio::SeqFeature::Computationfeature 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: (empty)
- Example: (empty)
_render_tags
- Usage: (empty)
- Desc: (empty)
- Ret: (empty)
- Args: (empty)
- Side Effects: (empty)
- Example: (empty)
_render_output_tags
- Usage: (empty)
- Desc: print out
<output>elements, with contents taken from theSeqFeature::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.
_render_tags_as_properties
- Usage: (empty)
- Desc: (empty)
- Ret: empty array
- Args: feature object, array of tag names
- Side Effects: (empty)
- Example: (empty)
In game xml, <annotation>, <computational_analysis>, and <feature_set> elements can have properties.
_render_comment_tags
- Usage: (empty)
- Desc: (empty)
- Ret: names of tags that were not comment tags
- Args: feature object, tag names available for us to render
- Side Effects: writes XML
- Example: (empty)
In game xml, <annotation> and <feature_set> elements can have comments.
_render_date_tags
- Usage: (empty)
- Desc: (empty)
- 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: (empty)
In game xml, <annotation>, <computational_analysis>, <transaction>, <comment>, and <feature_set> elements can have <date>s.
_render_dbxref_tags
- 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$/iis present
In game xml, <annotation> and <seq> elements can have dbxrefs.
_render_target_tags
- Usage: (empty)
- 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: (empty)
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:
_property - Usage:
$self->_property($tag => $value); - Function: an internal method to write property XML elements
- Returns: nothing
- Args: a tag/value pair
_unflatten_attribute
- 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
_xref
- Title:
_xref - Usage:
$self->_xref($value) - Function: an internal method to write db_xref elements
- Returns: nothing
- Args: a list of strings
_feature_span
- 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
_seq_relationship
- 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
_element
- 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
_span
- Title:
_span - Usage:
$self->_span($loc) - Function: an internal method to write the
'span'element - Returns: nothing
- Args: a
Bio::LocationI-compliant object
_seq
- 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
_find_name
- 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
and that's the whole page, bestie!! πβ¨
okay so the receipts: this is perl v5.32.1, dated 2021-08-15, and the manual page is Bio::S...Writer(3pm) β user contributed perl documentation, as always. she ate and left no crumbs. ππ¦π
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms