.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::DB::GFF::Adaptor::dbi::oracle 3pm" .TH Bio::DB::GFF::Adaptor::dbi::oracle 3pm "2018-10-27" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::DB::GFF::Adaptor::dbi::oracle \-\- Database adaptor for a specific oracle schema .SH "SYNOPSIS" .IX Header "SYNOPSIS" See Bio::DB::GFF .SH "DESCRIPTION" .IX Header "DESCRIPTION" This adaptor implements a specific oracle database schema that is compatible with Bio::DB::GFF. It inherits from Bio::DB::GFF::Adaptor::dbi, which itself inherits from Bio::DB::GFF. .PP The schema uses several tables: .IP "fdata" 4 .IX Item "fdata" This is the feature data table. Its columns are: .Sp .Vb 11 \& 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) .Ve .Sp Note that it would be desirable to normalize the reference sequence name, since there are usually many features that share the same reference feature. However, in the current schema, query performance suffers dramatically when this additional join is added. .IP "fgroup" 4 .IX Item "fgroup" This is the group table. There is one row for each group. Columns: .Sp .Vb 3 \& gid the group ID (integer) \& gclass the class of the group (string) \& gname the name of the group (string) .Ve .Sp The group table serves multiple purposes. 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 \s-1GFF\s0 version 2 format. .Sp The fgroup.gid field joins with the fdata.gid field. .Sp Examples: .Sp .Vb 7 \& sql> select * from fgroup where gname=\*(Aqsjj_2L52.1\*(Aq; \& +\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+ \& | 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=\*(AqPCR_product\*(Aq and gname = \*(Aqsjj_2L52.1\*(Aq \& and fdata.gid=fgroup.gid; \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ \& | fref | fstart | fstop | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ \& | CHROMOSOME_II | 1586 | 2355 | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+ \& 1 row in set (0.03 sec) .Ve .IP "ftype" 4 .IX Item "ftype" This table contains the feature types, one per row. Columns are: .Sp .Vb 3 \& ftypeid the feature type ID (integer) \& fmethod the feature type method name (string) \& fsource the feature type source name (string) .Ve .Sp The ftype.ftypeid field joins with the fdata.ftypeid field. Example: .Sp .Vb 11 \& sql> select fref,fstart,fstop,fmethod,fsource from fdata,fgroup,ftype \& where gclass=\*(AqPCR_product\*(Aq \& and gname = \*(Aqsjj_2L52.1\*(Aq \& 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) .Ve .IP "fdna" 4 .IX Item "fdna" This table holds the raw \s-1DNA\s0 of the reference sequences. It has three columns: .Sp .Vb 3 \& fref reference sequence name (string) \& foffset offset of this sequence \& fdna the DNA sequence (longblob) .Ve .Sp To overcome problems loading large blobs, \s-1DNA\s0 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. .IP "fattribute_to_feature" 4 .IX Item "fattribute_to_feature" This table holds \*(L"attributes\*(R", which are tag/value pairs stuffed into the \s-1GFF\s0 line. The first tag/value pair is treated as the group, and anything else is treated as an attribute (weird, huh?). .Sp .Vb 2 \& CHR_I assembly_tag Finished 2032 2036 . + . Note "Right: cTel33B" \& CHR_I assembly_tag Polymorphism 668 668 . + . Note "A\->C in cTel33B" .Ve .Sp The columns of this table are: .Sp .Vb 3 \& fid feature ID (integer) \& fattribute_id ID of the attribute (integer) \& fattribute_value text of the attribute (text) .Ve .Sp The fdata.fid column joins with fattribute_to_feature.fid. .IP "fattribute" 4 .IX Item "fattribute" This table holds the normalized names of the attributes. Fields are: .Sp .Vb 2 \& fattribute_id ID of the attribute (integer) \& fattribute_name Name of the attribute (varchar) .Ve .SS "Data Loading Methods" .IX Subsection "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. .SS "new" .IX Subsection "new" .Vb 6 \& 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 .Ve .PP The new constructor is identical to the \*(L"dbi\*(R" adaptor's \fInew()\fR method, except that the prefix \*(L"dbi:oracle\*(R" is added to the database \s-1DSN\s0 identifier automatically if it is not there already. .PP .Vb 2 \& Argument Description \& \-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \& \& \-dsn the DBI data source, e.g. \*(Aqdbi:mysql:ens0040\*(Aq or "ens0040" \& \& \-user username for authentication \& \& \-pass the password for authentication .Ve .SS "schema" .IX Subsection "schema" .Vb 6 \& Title : schema \& Usage : $schema = $db\->schema \& Function: return the CREATE script for the schema \& Returns : a list of CREATE statemetns \& Args : none \& Status : protected .Ve .PP This method returns a list containing the various \s-1CREATE\s0 statements needed to initialize the database tables. .SS "do_initialize" .IX Subsection "do_initialize" .Vb 6 \& 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 .Ve .PP This method will load the schema into the database. If \f(CW$drop_all\fR is true, then any existing data in the tables known to the schema will be deleted. .PP Internally, this method calls \fIschema()\fR to get the schema data. .SS "drop_all" .IX Subsection "drop_all" .Vb 6 \& Title : drop_all \& Usage : $db\->drop_all \& Function: empty the database \& Returns : void \& Args : none \& Status : protected .Ve .PP This method drops the tables known to this module. Internally it calls the abstract \fItables()\fR method. .SS "setup_load" .IX Subsection "setup_load" .Vb 6 \& Title : setup_load \& Usage : $db\->setup_load \& Function: called before load_gff_line() \& Returns : void \& Args : none \& Status : protected .Ve .PP This method performs schema-specific initialization prior to loading a set of \s-1GFF\s0 records. It prepares a set of \s-1DBI\s0 statement handlers to be used in loading the data. .SS "load_gff_line" .IX Subsection "load_gff_line" .Vb 6 \& 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 .Ve .PP This method is called once per line of the \s-1GFF\s0 and passed a series of parsed data items that are stored into the hashref \f(CW$fields\fR. The keys are: .PP .Vb 10 \& ref reference sequence \& source annotation source \& method annotation method \& start annotation start \& stop annotation stop \& score annotation score (may be undef) \& strand annotation strand (may be undef) \& phase annotation phase (may be undef) \& group_class class of annotation\*(Aqs group (may be undef) \& group_name ID of annotation\*(Aqs group (may be undef) \& target_start start of target of a similarity hit \& target_stop stop of target of a similarity hit \& attributes array reference of attributes, each of which is a [tag=>value] array ref .Ve .SS "get_table_id" .IX Subsection "get_table_id" .Vb 6 \& 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 .Ve .PP This internal method is called by load_gff_line to look up the integer \&\s-1ID\s0 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. .PP This method requires that a statement handler named \fIlookup_$table\fR, have been created previously by \fIsetup_load()\fR. It is here to overcome deficiencies in mysql's \s-1INSERT\s0 syntax. .SS "search_notes" .IX Subsection "search_notes" .Vb 6 \& 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 .Ve .PP 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: .PP .Vb 4 \& column 1 A Bio::DB::GFF::Featname object, suitable for passing to segment() \& column 2 The text of the note \& column 3 A relevance score. \& column 4 A Bio::DB::GFF::Typename object .Ve .SS "make_meta_set_query" .IX Subsection "make_meta_set_query" .Vb 6 \& 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 .Ve .PP By default this does nothing; meta parameters are not stored or retrieved.