Bio::D...oracle(3pm)
π Bio::D...oracle(3pm) π
okay so bestie, this is the Bio::DB::GFF::Adaptor::dbi::oracle page from the User Contributed Perl Documentation set, and it's genuinely a whole vibe. it's the database adaptor for a specific oracle schema. sit down, grab a strawberry, we're doing this π
β¨ NAME β¨
Bio::DB::GFF::Adaptor::dbi::oracle β Database adaptor for a specific oracle schema. that's it, that's the name, she's serving exactly what it says on the tin π
π¦ SYNOPSIS π¦
See Bio::DB::GFF.
(no fr, that's the whole synopsis. iconic brevity. she said "go read the parent module" and honestly? respect π«Ά)
π DESCRIPTION π
This adaptor implements a specific oracle database schema that is compatible with Bio::DB::GFF. And the family tree? she inherits from Bio::DB::GFF::Adaptor::dbi, which itself inherits from Bio::DB::GFF. three generations of iconic π
The schema uses several tables, and bestie we are going to meet ALL of them:
π§ fdata π§
This is the feature data table, the main character. Its columns are:
fid feature ID (integer)
fref reference sequence name (string)
fstart start position relative to reference (integer)
fstop stop position relative to reference (integer)
ftypeid feature type ID (integer)
fscore feature score (float); may be null
fstrand strand; one of "+" or "-"; may be null
fphase phase; one of 0, 1 or 2; may be null
gid group ID (integer)
ftarget_start for similarity features, the target start position (integer)
ftarget_stop for similarity features, the target stop position (integer)
lowkey important note: it would be desirable to normalize the reference sequence name, since there are usually many features that share the same reference feature. BUT. in the current schema, query performance suffers dramatically when this additional join is added. so they didn't. and that's the tea π«
πΈ fgroup πΈ
This is the group table. There is one row for each group. Columns:
gid the group ID (integer)
gclass the class of the group (string)
gname the name of the group (string)
The group table serves multiple purposes, she's versatile. As you might expect, it is used to cluster features that logically belong together, such as the multiple exons of the same transcript. It is also used to assign a name and class to a singleton feature. Finally, the group table is used to identify the target of a similarity hit. This is consistent with the way in which the group field is used in the GFF version 2 format.
The fgroup.gid field joins with the fdata.gid field.
Examples, aka the receipts:
sql> select * from fgroup where gname='sjj_2L52.1';
+-------+-------------+------------+
| gid | gclass | gname |
+-------+-------------+------------+
| 69736 | PCR_product | sjj_2L52.1 |
+-------+-------------+------------+
1 row in set (0.70 sec)
sql> select fref,fstart,fstop from fdata,fgroup
where gclass='PCR_product' and gname = 'sjj_2L52.1'
and fdata.gid=fgroup.gid;
+---------------+--------+-------+
| fref | fstart | fstop |
+---------------+--------+-------+
| CHROMOSOME_II | 1586 | 2355 |
+---------------+--------+-------+
1 row in set (0.03 sec)
π¦ ftype π¦
This table contains the feature types, one per row. Columns are:
ftypeid the feature type ID (integer)
fmethod the feature type method name (string)
fsource the feature type source name (string)
The ftype.ftypeid field joins with the fdata.ftypeid field. Example:
sql> select fref,fstart,fstop,fmethod,fsource from fdata,fgroup,ftype
where gclass='PCR_product'
and gname = 'sjj_2L52.1'
and fdata.gid=fgroup.gid
and fdata.ftypeid=ftype.ftypeid;
+---------------+--------+-------+-------------+-----------+
| fref | fstart | fstop | fmethod | fsource |
+---------------+--------+-------+-------------+-----------+
| CHROMOSOME_II | 1586 | 2355 | PCR_product | GenePairs |
+---------------+--------+-------+-------------+-----------+
1 row in set (0.08 sec)
π fdna π
This table holds the raw DNA of the reference sequences. She has three columns:
fref reference sequence name (string)
foffset offset of this sequence
fdna the DNA sequence (longblob)
To overcome problems loading large blobs, DNA is automatically fragmented into multiple segments when loading, and the position of each segment is stored in foffset. The fragment size is controlled by the -clump_size argument during initialization. chunked and organized, we love to see it β¨
π fattribute_to_feature π
This table holds "attributes", which are tag/value pairs stuffed into the GFF line. The first tag/value pair is treated as the group, and anything else is treated as an attribute (weird, huh? yeah bestie, weird π).
CHR_I assembly_tag Finished 2032 2036 . + . Note "Right: cTel33B"
CHR_I assembly_tag Polymorphism 668 668 . + . Note "A->C in cTel33B"
The columns of this table are:
fid feature ID (integer)
fattribute_id ID of the attribute (integer)
fattribute_value text of the attribute (text)
The fdata.fid column joins with fattribute_to_feature.fid.
β fattribute β
This table holds the normalized names of the attributes. Fields are:
fattribute_id ID of the attribute (integer)
fattribute_name Name of the attribute (varchar)
π Data Loading Methods π
In addition to implementing the abstract SQL-generating methods of Bio::DB::GFF::Adaptor::dbi, this module also implements the data loading functionality of Bio::DB::GFF. so she does both jobs. girlboss π«Ά
π new π
Title : new
Usage : $db = Bio::DB::GFF->new(@args)
Function: create a new adaptor
Returns : a Bio::DB::GFF object
Args : see below
Status : Public
The new constructor is identical to the "dbi" adaptor's new() method, except that the prefix "dbi:oracle" is added to the database DSN identifier automatically if it is not there already. auto-prefix, no cap π
Argument Description
-------- -----------
-dsn the DBI data source, e.g. 'dbi:mysql:ens0040' or "ens0040"
-user username for authentication
-pass the password for authentication
π schema π
Title : schema
Usage : $schema = $db->schema
Function: return the CREATE script for the schema
Returns : a list of CREATE statemetns
Args : none
Status : protected
This method returns a list containing the various CREATE statements needed to initialize the database tables. it's giving construction permit ποΈ
π§ do_initialize π§
Title : do_initialize
Usage : $success = $db->do_initialize($drop_all)
Function: initialize the database
Returns : a boolean indicating the success of the operation
Args : a boolean indicating whether to delete existing data
Status : protected
This method will load the schema into the database. If $drop_all is true, then any existing data in the tables known to the schema will be deleted. be so serious before you pass that flag, bestie π
Internally, this method calls schema() to get the schema data.
π drop_all π
Title : drop_all
Usage : $db->drop_all
Function: empty the database
Returns : void
Args : none
Status : protected
This method drops the tables known to this module. Internally it calls the abstract tables() method. yeah. she's the destructive one. periodt π
π¦ setup_load π¦
Title : setup_load
Usage : $db->setup_load
Function: called before load_gff_line()
Returns : void
Args : none
Status : protected
This method performs schema-specific initialization prior to loading a set of GFF records. It prepares a set of DBI statement handlers to be used in loading the data. prep work, main character energy π
π load_gff_line π
Title : load_gff_line
Usage : $db->load_gff_line($fields)
Function: called to load one parsed line of GFF
Returns : true if successfully inserted
Args : hashref containing GFF fields
Status : protected
This method is called once per line of the GFF and passed a series of parsed data items that are stored into the hashref $fields. The keys are:
refβ reference sequencesourceβ annotation sourcemethodβ annotation methodstartβ annotation startstopβ annotation stopscoreβ annotation score (may be undef)strandβ annotation strand (may be undef)phaseβ annotation phase (may be undef)group_classβ class of annotation's group (may be undef)group_nameβ ID of annotation's group (may be undef)target_startβ start of target of a similarity hittarget_stopβ stop of target of a similarity hitattributesβ array reference of attributes, each of which is a [tag=>value] array ref
π₯ get_table_id π₯
Title : get_table_id
Usage : $integer = $db->get_table_id($table,@ids)
Function: get the ID of a group or type
Returns : an integer ID or undef
Args : none
Status : private
This internal method is called by load_gff_line to look up the integer ID of an existing feature type or group. The arguments are the name of the table, and two string identifiers. For feature types, the identifiers are the method and source. For groups, the identifiers are group name and class.
This method requires that a statement handler named lookup_$table have been created previously by setup_load(). It is here to overcome deficiencies in mysql's INSERT syntax. (mysql bestie, we still love you, but π¬)
π search_notes π
Title : search_notes
Usage : @search_results = $db->search_notes("full text search string",$limit)
Function: Search the notes for a text string, using mysql full-text search
Returns : array of results
Args : full text search string, and an optional row limit
Status : public
This is a mysql-specific method. Given a search string, it performs a full-text search of the notes table and returns an array of results. Each row of the returned array is a arrayref containing the following fields:
- column 1 β A
Bio::DB::GFF::Featnameobject, suitable for passing tosegment() - column 2 β The text of the note
- column 3 β A relevance score.
- column 4 β A
Bio::DB::GFF::Typenameobject
π§ make_meta_set_query π§
Title : make_meta_set_query
Usage : $sql = $db->make_meta_set_query
Function: return SQL fragment for setting a meta parameter
Returns : SQL fragment
Args : none
Status : public
By default this does nothing; meta parameters are not stored or retrieved. she's on her "no thoughts, head empty" arc and that is by design π
okay bestie, that's the whole page, every table, every column, every method, every flag, zero skips, no crumbs left π
this was the Bio::D...oracle(3pm) page from the User Contributed Perl Documentation, and the footer energy is: perl v5.30.0, dated 2020-01-13. so like, vintage but still serving. slay, take care, hydrate, and always pass your -dsn correctly π«Άπ
β¨
π¦ where this page comes from
- debian bookworm: libbio-db-gff-perl 1.7.4-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-db-gff-perl 1.7.4-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libbio-db-gff-perl 1.7.4-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-db-gff-perl 1.7.4-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms