Bio::Seq::MetaI(3pm)
π Bio::Seq::MetaI π
okay so bestie, welcome to Bio::Seq::MetaI β the User Contributed Perl Documentation page for it, no less. this is the interface for sequence objects that carry residue-based meta info, and yes it's an abstract interface so it's giving "vibes only, implementation is someone else's problem" β¨
πΈ NAME πΈ
Bio::Seq::MetaI β the interface for sequence objects that have residue-based meta information attached. it's abstract, it's an interface, it's the blueprint bestie π
β¨ SYNOPSIS β¨
so like, first you gotta get a Bio::Seq::MetaI compliant object somehow (not our problem how, we're just vibing here):
# get a Bio::Seq::MetaI compliant object somehow
# to test this is a meta seq object
$obj->isa("Bio::Seq::MetaI")
|| $obj->throw("$obj not a Bio::Seq::MetaI");
# accessors
$string = $obj->meta;
$string = $obj->meta_text;
$substring = $obj->submeta(12,50);
$unique_key = $obj->accession_number();
π¦ DESCRIPTION π¦
okay so this class defines an abstract interface for basic residue-based meta information. what even is that kind of meta data, you ask? think secondary structures (RNA and protein, periodt), protein hydrophobicity assignments, or literally any other alternative alphabets for polypeptides, sequence quality data, and nucleotide alignments with translations. it's giving "extra info glued to every residue" π§¬β¨
here's the tea: the length of the meta data sequence is not dependent on the amount of meta information. the meta info always covers all the residues, but a blank value is used to say "we don't have this one, sorry bestie". if necessary, the implementation quietly truncates or extends meta information with blank values. definition of blank is implementation dependent, iykyk. and gaps in MSAs should not have meta information β no cap π«
at this point a residue in a sequence object can have only one meta value. if you need more, use multiple copies of the sequence object. that's the rule, sorry π«Ά
meta data storage can be implemented in various ways, e.g: string, array of scalars, array of hashes, array of objects. so many options, we love flexibility π
if the implementation so chooses, there can be more than one meta value associated to each residue. see named_meta and names_submeta. but β and this is important bestie β note that use of arbitrary names is very prone to typos leading to creation of additional copies of meta data sets. typos will absolutely betray you π
Bio::Seq::Meta provides basic, pure perl implementation of sequences with meta information. see Bio::Seq::Meta. application specific implementations will override and add to these methods. iconic behaviour honestly π
π Method naming π
character based meta data is read and set by method meta() and its variants. these are the suffixes and prefixes used in the variants:
[named_] [sub] meta [_text]
_textβ suffix_textguaranties that output is a string. note that it does not limit the input. output string, input whatever, we don't gatekeep πsubβ prefixsub, like insubseq(), means that the method applies to a sub region of the sequence range and takes start and end as arguments. unlikesubseq(), these methods are able to set values. if the range is not defined, it defaults to the complete sequence. sosubis likesubseq()but with main character energy π₯named_β prefixnamed_in method names allows the user to attach multiple meta strings to one sequence by explicitly naming them. the name is always the first argument to the method. the "unnamed" methods use the class wide default name for the meta data and are thus special cases of "named" methods. slay π
note that internally names are keys in a hash and any misspelling of a name will silently store the data under a wrong name. silently. under a wrong name. be careful bestie π the used names (keys) can be retrieved using methodmeta_names(). seemeta_names.
π SEE ALSO π
Bio::Seq::Meta, Bio::Seq::Meta::Array, Bio::Seq::EncodedSeq, Bio::Tools::OddCodes, Bio::Seq::Quality
π 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 π«Ά
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. 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. receipts help, bestie π§Ύβ¨
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 - Heikki Lehvaslaiho π
email heikki-at-bioperl-dot-org
π CONTRIBUTORS π
Chad Matsalla, bioinformatics@dieselwurks.com; Aaron Mackey, amackey@virginia.edu; Peter Schattner schattner@alum.mit.edu; Richard Adams, Richard.Adams@ed.ac.uk
π APPENDIX π
the rest of the documentation details each of the object methods. internal methods are usually preceded with a _
π meta
Title : meta
Usage : $meta_values = $obj->meta($values_string);
Function:
Get and set method for the unnamed meta data starting from
residue position one. Since it is dependent on the length
of the sequence, it needs to be manipulated after the
sequence.
The implementation may choose to accept argument values in
a string or in an array (reference) or in a hash
(reference).
The return value may be a string or an array reference,
depending on the implementation. If in doubt, use meta_text()
which is a variant guarantied to return a string. See
L<meta_text>.
The length of the returned value always matches the length
of the sequence.
Returns : A reference to an array or a string
Args : new value, optional
πΈ meta_text
Title : meta_text()
Usage : $meta_values = $obj->meta_text($values_arrayref);
Function: Variant of meta() guarantied to return a textual
representation of the meta data. For details, see L<meta>.
Returns : a string
Args : new value, optional
π¦ named_meta
Title : named_meta()
Usage : $meta_values = $obj->named_meta($name, $values_arrayref);
Function: A more general version of meta(). Each meta data set needs
to be named. See also L<meta_names>.
Returns : a string
Args : scalar, name of the meta data set
new value, optional
β¨ named_meta_text
Title : named_meta_text()
Usage : $meta_values = $obj->named_meta_text($name, $values_arrayref);
Function: Variant of named_meta() guarantied to return a textual
representation of the named meta data.
For details, see L<meta>.
Returns : a string
Args : scalar, name of the meta data set
new value, optional
π submeta
Title : submeta
Usage : $subset_of_meta_values = $obj->submeta(10, 20, $value_string);
$subset_of_meta_values = $obj->submeta(10, undef, $value_string);
Function:
Get and set method for meta data for subsequences.
Numbering starts from 1 and the number is inclusive, ie 1-2
are the first two residue of the sequence. Start cannot be
larger than end but can be equal.
If the second argument is missing the returned values
should extend to the end of the sequence.
If implementation tries to set values beyond the current
sequence, they should be ignored.
The return value may be a string or an array reference,
depending on the implementation. If in doubt, use
submeta_text() which is a variant guarantied to return a
string. See L<submeta_text>.
Returns : A reference to an array or a string
Args : integer, start position, optional
integer, end position, optional
new value, optional
π submeta_text
Title : submeta_text
Usage : $meta_values = $obj->submeta_text(20, $value_string);
Function: Variant of submeta() guarantied to return a textual
representation of meta data. For details, see L<meta>.
Returns : a string
Args : integer, start position, optional
integer, end position, optional
new value, optional
π named_submeta
Title : named_submeta
Usage : $subset_of_meta_values = $obj->named_submeta($name, 10, 20, $value_string);
$subset_of_meta_values = $obj->named_submeta($name, 10);
Function: Variant of submeta() guarantied to return a textual
representation of meta data. For details, see L<meta>.
Returns : A reference to an array or a string
Args : scalar, name of the meta data set
integer, start position
integer, end position, optional when a third argument present
new value, optional
π§ named_submeta_text
Title : named_submeta_text
Usage : $meta_values = $obj->named_submeta_text($name, 20, $value_string);
Function: Variant of submeta() guarantied to return a textual
representation of meta data. For details, see L<meta>.
Returns : a string
Args : scalar, name of the meta data
Args : integer, start position, optional
integer, end position, optional
new value, optional
π meta_names
Title : meta_names
Usage : @meta_names = $obj->meta_names()
Function: Retrieves an array of meta data set names. The default (unnamed)
set name is guarantied to be the first name.
Returns : an array of names
Args : none
π₯ force_flush
Title : force_flush()
Usage : $force_flush = $obj->force_flush(1);
Function: Automatically pad with empty values or truncate meta values to
sequence length
Returns : boolean 1 or 0
Args : optional boolean value
β is_flush
Title : is_flush
Usage : $is_flush = $obj->is_flush()
or $is_flush = $obj->is_flush($my_meta_name)
Function: Boolean to tell if all meta values are in
flush with the sequence length.
Returns true if force_flush() is set
Set verbosity to a positive value to see failed meta sets
Returns : boolean 1 or 0
Args : optional name of the meta set
π meta_length
Title : meta_length()
Usage : $meeta_len = $obj->meta_length();
Function: return the number of elements in the meta set
Returns : integer
Args : -
π named_meta_length
Title : named_meta_length()
Usage : $meeta_len = $obj->named_meta_length($name);
Function: return the number of elements in the named meta set
Returns : integer
Args : -
β¨ Bio::PrimarySeqI methods β¨
Okay so bestie, if you're an implementing class, you're gonna need to rewrite these Bio::PrimaryI methods. Like, it's giving group project where you do your own part, but make it slay. π
π revcom
- Title β
revcom - Usage β
$newseq = $seq->revcom(); - Function β Produces a new
Bio::Seq::MetaIimplementing object where the order of residues and their meta information is reversed. - Returns β A new (fresh)
Bio::Seq::MetaIobject - Args β none
Not it flipping the whole sequence and its meta info, then handing you a brand-new object? Obsessed. π¦
π trunc
- Title β
trunc - Usage β
$subseq = $myseq->trunc(10,100); - Function β Provides a truncation of a sequence
- Returns β a fresh
Bio::Seq::MetaIimplementing object - Args β Two integers denoting first and last residue of the sub-sequence.
It's literally chopping out a little sub-sequence moment, and you get a fresh Bio::Seq::MetaI implementing object back. Periodt. π
Mwah π this was served fresh from perl v5.32.1, dated 2021-08-15, and it's the Bio::Seq::MetaI(3pm) manual page. No cap, that's the whole vibe. π«Ά
π¦ 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