.\" 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::Flat 3pm" .TH Bio::DB::Flat 3pm "2020-10-28" "perl v5.30.3" "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::Flat \- Interface for indexed flat files .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& $db = Bio::DB::Flat\->new(\-directory => \*(Aq/usr/share/embl\*(Aq, \& \-dbname => \*(Aqmydb\*(Aq, \& \-format => \*(Aqembl\*(Aq, \& \-index => \*(Aqbdb\*(Aq, \& \-write_flag => 1); \& $db\->build_index(\*(Aq/usr/share/embl/primate.embl\*(Aq, \& \*(Aq/usr/share/embl/protists.embl\*(Aq); \& $seq = $db\->get_Seq_by_id(\*(AqHSFOS\*(Aq); \& @sequences = $db\->get_Seq_by_acc(\*(AqDIV\*(Aq => \*(Aqprimate\*(Aq); \& $raw = $db\->fetch_raw(\*(AqHSFOS\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object provides the basic mechanism to associate positions in files with primary and secondary name spaces. Unlike Bio::Index::Abstract (see Bio::Index::Abstract), this is specialized to work with the \*(L"flat index\*(R" and BerkeleyDB indexed flat file formats worked out at the 2002 BioHackathon. .PP This object is a general front end to the underlying databases. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "Reporting Bugs" Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Lincoln Stein" .IX Header "AUTHOR - Lincoln Stein" Email \- lstein@cshl.org .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with an \*(L"_\*(R" (underscore). .SS "new" .IX Subsection "new" .Vb 10 \& Title : new \& Usage : my $db = Bio::DB::Flat\->new( \& \-directory => $root_directory, \& \-dbname => \*(Aqmydb\*(Aq, \& \-write_flag => 1, \& \-index => \*(Aqbdb\*(Aq, \& \-verbose => 0, \& \-out => \*(Aqoutputfile\*(Aq, \& \-format => \*(Aqgenbank\*(Aq); \& Function: create a new Bio::DB::Flat object \& Returns : new Bio::DB::Flat object \& Args : \-directory Root directory containing "config.dat" \& \-write_flag If true, allows creation/updating. \& \-verbose Verbose messages \& \-out File to write to when write_seq invoked \& \-index \*(Aqbdb\*(Aq or \*(Aqbinarysearch\*(Aq \& Status : Public .Ve .PP The required \-directory argument indicates where the flat file indexes will be stored. The \fBbuild_index()\fR and \fBwrite_seq()\fR methods will automatically create subdirectories of this root directory. Each subdirectory will contain a human-readable configuration file named \&\*(L"config.dat\*(R" that specifies where the individual indexes are stored. .PP The required \-dbname argument gives a name to the database index. The index files will actually be stored in a like-named subdirectory underneath the root directory. .PP The \-write_flag enables writing new entries into the database as well as the creation of the indexes. By default the indexes will be opened read only. .PP \&\-index is one of \*(L"bdb\*(R" or \*(L"binarysearch\*(R" and indicates the type of index to generate. \*(L"bdb\*(R" corresponds to Berkeley \s-1DB.\s0 You *must* be using BerkeleyDB version 2 or higher, and have the Perl BerkeleyDB extension installed (DB_File will *not* work). \*(L"binarysearch\*(R" corresponds to the \s-1OBDA\s0 \*(L"flat\*(R" indexed file. .PP The \-out argument specifies the output file for writing objects created with \fBwrite_seq()\fR. .PP The \-format argument specifies the format of the input file or files. If the file suffix is one that Bioperl can already associate with a format then this is optional. .SS "new_from_registry" .IX Subsection "new_from_registry" .Vb 7 \& Title : new_from_registry \& Usage : $db = Bio::DB::Flat\->new_from_registry(%config) \& Function: creates a new Bio::DB::Flat object in a Bio::DB::Registry\- \& compatible fashion \& Returns : new Bio::DB::Flat \& Args : provided by the registry, see below \& Status : Public .Ve .PP The following registry-configuration tags are recognized: .PP .Vb 2 \& location Root of the indexed flat file; corresponds to the new() method\*(Aqs \& \-directory argument. .Ve .SS "fetch" .IX Subsection "fetch" .Vb 6 \& Title : fetch \& Usage : $index\->fetch( $id ) \& Function: Returns a Bio::Seq object from the index \& Example : $seq = $index\->fetch( \*(AqdJ67B12\*(Aq ) \& Returns : Bio::Seq object \& Args : ID .Ve .PP Deprecated. Use get_Seq_by_id instead. .SS "To Be Implemented in Subclasses" .IX Subsection "To Be Implemented in Subclasses" The following methods \s-1MUST\s0 be implemented by subclasses. .SS "May Be Overridden in Subclasses" .IX Subsection "May Be Overridden in Subclasses" The following methods \s-1MAY\s0 be overridden by subclasses.