.\" Automatically generated by Pod::Man 4.11 (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 .. .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 .\" ======================================================================== .\" .IX Title "Bio::DB::GFF::Adaptor::berkeleydb 3pm" .TH Bio::DB::GFF::Adaptor::berkeleydb 3pm "2020-01-13" "perl v5.30.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::DB::GFF::Adaptor::berkeleydb \-\- Bio::DB::GFF database adaptor for in\-memory databases .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Bio::DB::GFF; \& my $db = Bio::DB::GFF\->new(\-adaptor=> \*(Aqberkeleydb\*(Aq, \& \-create => 1, # on initial build you need this \& \-dsn => \*(Aq/usr/local/share/gff/dmel\*(Aq); \& \& # initialize an empty database, then load GFF and FASTA files \& $db\->initialize(1); \& $db\->load_gff(\*(Aq/home/drosophila_R3.2.gff\*(Aq); \& $db\->load_fasta(\*(Aq/home/drosophila_R3.2.fa\*(Aq); \& \& # do queries \& my $segment = $db\->segment(Chromosome => \*(Aq1R\*(Aq); \& my $subseg = $segment\->subseq(5000,6000); \& my @features = $subseg\->features(\*(Aqgene\*(Aq); .Ve .PP See Bio::DB::GFF for other methods. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This adaptor implements a berkeleydb-indexed version of Bio::DB::GFF. It requires the DB_File and Storable modules. It can be used to store and retrieve short to medium-length \s-1GFF\s0 files of several million features in length. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" Use Bio::DB::GFF\->\fBnew()\fR to construct new instances of this class. Three named arguments are recommended: .PP .Vb 2 \& Argument Description \& \-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \& \& \-adaptor Set to "berkeleydb" to create an instance of this class. \& \& \-dsn Path to directory where the database index files will be stored (alias \-db) \& \& \-autoindex Monitor the indicated directory path for FASTA and GFF files, and update the \& indexes automatically if they change (alias \-dir) \& \& \-write Set to a true value in order to update the database. \& \& \-create Set to a true value to create the database the first time \& (implies \-write) \& \& \-tmp Location of temporary directory for storing intermediate files \& during certain queries. \& \& \-preferred_groups Specify the grouping tag. See L .Ve .PP The \-dsn argument selects the directory in which to store the database index files. If the directory does not exist it will be created automatically, provided that the current process has sufficient privileges. If no \-dsn argument is specified, a database named \*(L"test\*(R" will be created in your system's temporary files directory. .PP The \-tmp argument specifies the temporary directory to use for storing intermediate search results. If not specified, your system's temporary files directory will be used. On Unix systems, the \s-1TMPDIR\s0 environment variable is honored. Note that some queries can require a lot of space. .PP The \-autoindex argument, if present, selects a directory to be monitored for \s-1GFF\s0 and \s-1FASTA\s0 files (which can be compressed with the gzip program if desired). Whenever any file in this directory is changed, the index files will be updated. Note that the indexing can take a long time to run: anywhere from 5 to 10 minutes for a million features. An alias for this argument is \-dir, which gives this adaptor a similar flavor to the \*(L"memory\*(R" adaptor. .PP \&\-dsn and \-dir can point to the same directory. If \-dir is given but \&\-dsn is absent the index files will be stored into the directory containing the source files. For autoindexing to work, you must specify the same \-dir path each time you open the database. .PP If you do not choose autoindexing, then you will want to load the database using the bp_load_gff.pl command-line tool. For example: .PP .Vb 1 \& bp_load_gff.pl \-a berkeleydb \-c \-d /usr/local/share/gff/dmel dna1.fa dna2.fa features.gff .Ve .SH "METHODS" .IX Header "METHODS" See Bio::DB::GFF for inherited methods .SH "BUGS" .IX Header "BUGS" The various get_Stream_* methods and the \fBfeatures()\fR method with the \&\-iterator argument only return an iterator after the query runs completely and the module has been able to generate a temporary results file on disk. This means that iteration is not as big a win as it is for the relational-database adaptors. .PP Like the dbi::mysqlopt adaptor, this module uses a binning scheme to speed up range-based searches. The binning scheme used here imposes a hard-coded 1 gigabase (1000 Mbase) limit on the size of the largest chromosome or other reference sequence. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::DB::GFF, bioperl .SH "AUTHORS" .IX Header "AUTHORS" Vsevolod (Simon) Ilyushchenko >simonf@cshl.edu< Lincoln Stein >lstein@cshl.edu< .PP Copyright (c) 2005 Cold Spring Harbor Laboratory. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SS "_feature_by_name" .IX Subsection "_feature_by_name" .Vb 6 \& Title : _feature_by_name \& Usage : $db\->get_features_by_name($class,$name,$callback) \& Function: get a list of features by name and class \& Returns : count of number of features retrieved \& Args : name of feature, class of feature, and a callback \& Status : protected .Ve .PP This method is used internally. The callback arguments are those used by \fBmake_feature()\fR.