.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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::Graphics::Browser2::DataSource 3pm" .TH Bio::Graphics::Browser2::DataSource 3pm "2023-12-07" "perl v5.36.0" "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::Graphics::Browser2::DataSource \-\- DataSource to access data .SH "SYNOPSIS" .IX Header "SYNOPSIS" .SH "DESCRIPTION" .IX Header "DESCRIPTION" .SS "\s-1METHODS\s0" .IX Subsection "METHODS" .Vb 1 \& $path = $source\->userdata(@path_components) \& \& Returns a path to somewhere in the tmp file system for the \& indicated userdata. .Ve .SS "\fBglobal_setting()\fP" .IX Subsection "global_setting()" .Vb 1 \& $setting = $source\->global_setting(\*(Aqoption\*(Aq) .Ve .PP Like \fBcode_setting()\fR except that it is only for 'general' options. If the option is not found in the datasource config file, then looks in the global file. .ie n .SS "$section_setting = $data_source\->section_setting($section_name)" .el .SS "\f(CW$section_setting\fP = \f(CW$data_source\fP\->section_setting($section_name)" .IX Subsection "$section_setting = $data_source->section_setting($section_name)" Returns \*(L"open\*(R" \*(L"closed\*(R" or \*(L"off\*(R" for the named section. Named sections are: .PP .Vb 7 \& instructions \& search \& overview \& details \& tracks \& display \& upload_tracks .Ve .SS "\fBadd_scale_tracks()\fP" .IX Subsection "add_scale_tracks()" This is called at initialization time to add track configs for the automatic \*(L"scale\*(R" (arrow) tracks for details, overview and regionview .ie n .IP "$db = $dsn\->databases" 4 .el .IP "\f(CW$db\fR = \f(CW$dsn\fR\->databases" 4 .IX Item "$db = $dsn->databases" Return all named databases from [name:database] tracks. .ie n .IP "($adaptor,@argv) = $dsn\->db2args('databasename')" 4 .el .IP "($adaptor,@argv) = \f(CW$dsn\fR\->db2args('databasename')" 4 .IX Item "($adaptor,@argv) = $dsn->db2args('databasename')" Given a database named by ['databasename':database], return its adaptor and arguments. .ie n .IP "($dbid,$adaptor,@argv) = $dsn\->db_settings('track_label')" 4 .el .IP "($dbid,$adaptor,@argv) = \f(CW$dsn\fR\->db_settings('track_label')" 4 .IX Item "($dbid,$adaptor,@argv) = $dsn->db_settings('track_label')" Return the adaptor and arguments suitable for the database identified by the given track label. If no track label is given then the \&\*(L"general\*(R" default database is used. .ie n .IP "$db = $dsn\->open_database('track')" 4 .el .IP "\f(CW$db\fR = \f(CW$dsn\fR\->open_database('track')" 4 .IX Item "$db = $dsn->open_database('track')" Return the database handle specified by the given track label or \&'general' if not given. The databases are cached and so it is ok to call repeatedly. .ie n .IP "@ids = $dsn\->db2id($db)" 4 .el .IP "\f(CW@ids\fR = \f(CW$dsn\fR\->db2id($db)" 4 .IX Item "@ids = $dsn->db2id($db)" .PD 0 .ie n .IP "$dbid = $dsn\->db2id($db)" 4 .el .IP "\f(CW$dbid\fR = \f(CW$dsn\fR\->db2id($db)" 4 .IX Item "$dbid = $dsn->db2id($db)" .PD Given a database handle, return all dbids that correspond to that database. In a scalar context, returns just the first dbid that uses it. It is less confusing to call in a scalar context. .ie n .IP "@ids = $dsn\->dbs" 4 .el .IP "\f(CW@ids\fR = \f(CW$dsn\fR\->dbs" 4 .IX Item "@ids = $dsn->dbs" Return the names of all the sections that define dbs in the datasource: both track sections that define dbargs and named database sections. Note that we do not uniquify the case in which the same adaptor and dbargs are defined twice in two different sections. .ie n .IP "$dsn\->clear_cache" 4 .el .IP "\f(CW$dsn\fR\->clear_cache" 4 .IX Item "$dsn->clear_cache" Empty out our cache of database settings and fetch anew from config file .SS "generate_image" .IX Subsection "generate_image" .Vb 1 \& ($url,$path) = generate_image($gd); .Ve .PP Given a GD::Image object, this method calls its \fBpng()\fR or \fBgif()\fR methods (depending on \s-1GD\s0 version), stores the output into the temporary \&\*(L"images\*(R" subdirectory of the directory given by the \*(L"tmp_base\*(R" option in the configuration file. It returns a two element list consisting of the \s-1URL\s0 to the image and the physical path of the image. .ie n .SS "$source\->add_dbid_to_feature($feature,$dbid_hashref)" .el .SS "\f(CW$source\fP\->add_dbid_to_feature($feature,$dbid_hashref)" .IX Subsection "$source->add_dbid_to_feature($feature,$dbid_hashref)" This adds a new method called \fBgbrowse_dbid()\fR to a feature. Do not call it if the method is already in the feature's class. The hashref should be populated by feature memory locations (overload::StrVal($feature)) as keys and database symbolic IDs as values. .ie n .SS "@labels = $source\->data_source_to_label(@data_sources)" .el .SS "\f(CW@labels\fP = \f(CW$source\fP\->data_source_to_label(@data_sources)" .IX Subsection "@labels = $source->data_source_to_label(@data_sources)" Search through all stanzas for those with a matching \*(L"data source\*(R" option. Data sources look like this: .PP .Vb 2 \& [stanzaLabel1] \& data source = FlyBase \& \& [stanzaLabel2] \& data source = FlyBase .Ve .PP Now searching for \f(CW$source\fR\->data_source_to_label('FlyBase') will return \&\*(L"stanzaLabel1\*(R" and \*(L"stanzaLabel2\*(R" along with others that match. A track may have several data sources, separated by spaces. .ie n .SS "@labels = $source\->track_source_to_label(@track_sources)" .el .SS "\f(CW@labels\fP = \f(CW$source\fP\->track_source_to_label(@track_sources)" .IX Subsection "@labels = $source->track_source_to_label(@track_sources)" Search through all stanzas for those with a matching \*(L"track source\*(R" option. Track sources look like this: .PP .Vb 2 \& [stanzaLabel] \& track source = UCSC EBI NCBI .Ve .PP Now searching for \f(CW$source\fR\->track_source_to_label('\s-1UCSC\s0','\s-1EBI\s0') will return \*(L"stanzaLabel\*(R" along with others that match. A track may have several space-delimited track sources. .ie n .SS "$boolean = $source\->use_inline_imagemap($label=>$length)" .el .SS "\f(CW$boolean\fP = \f(CW$source\fP\->use_inline_imagemap($label=>$length)" .IX Subsection "$boolean = $source->use_inline_imagemap($label=>$length)" Given a track label and length (for semantic zooming) return true if we should generate an inline clickable imagemap vs one in which the actions are generated by Ajax callbacks