BioPerl
view release on metacpan or search on metacpan
Bio/DB/GenBank.pm view on Meta::CPAN
=head2 get_Seq_by_acc
Title : get_Seq_by_acc
Usage : $seq = $db->get_Seq_by_acc($acc);
Function: Gets a Seq object by accession numbers
Returns : a Bio::Seq object
Args : the accession number as a string
Note : For GenBank, this just calls the same code for get_Seq_by_id().
Caveat: this normally works, but in rare cases simply passing the
accession can lead to odd results, possibly due to unsynchronized
NCBI ID servers. Using get_Seq_by_version() is slightly better, but
using the unique identifier (GI) and get_Seq_by_id is the most
consistent
Throws : "id does not exist" exception
=head2 get_Seq_by_gi
Title : get_Seq_by_gi
Usage : $seq = $db->get_Seq_by_gi('405830');
Function: Gets a Bio::Seq object by gi number
Bio/DB/SeqFeature/Store.pm view on Meta::CPAN
Function: fetch feature from database
Returns : feature
Args : primary id
Status : ABSTRACT METHOD; MUST BE IMPLEMENTED BY AN ADAPTOR
This method is the back end for fetch(). It accepts a primary_id and
returns a feature object. It must be implemented by the adaptor.
In practice, the implementation will retrieve the serialized
Bio::SeqfeatureI object from the database and pass it to the thaw()
method to unserialize it and synchronize the primary_id.
=cut
# _fetch($id)
sub _fetch { shift->throw_not_implemented }
=head2 _fetch_many
Title : _fetch_many
Usage : $feature = $db->_fetch_many(@primary_ids)
Bio/DB/SeqFeature/Store/DBI/SQLite.pm view on Meta::CPAN
$writeable = 1 if $is_temporary or $dump_dir;
$dsn or $self->throw("Usage: ".__PACKAGE__."->init(-dsn => \$dbh || \$dsn)");
my $dbh;
if (ref $dsn) {
$dbh = $dsn;
} else {
$dsn = "dbi:SQLite:$dsn" unless $dsn =~ /^dbi:/;
$dbh = DBI->connect($dsn,$user,$pass,$dbi_options) or $self->throw($DBI::errstr);
$dbh->do("PRAGMA synchronous = OFF;"); # makes writes much faster
$dbh->do("PRAGMA temp_store = MEMORY;"); # less disk I/O; some speedup
$dbh->do("PRAGMA cache_size = 20000;"); # less disk I/O; some speedup
# Keep track of database file location
my $cwd = getcwd;
my ($db_file) = ($dsn =~ m/(?:db(?:name)?|database)=(.+)$/);
$self->{dbh_file} = "$cwd/$db_file";
}
$self->{dbh} = $dbh;
$self->{fts} = $fts;
$self->{is_temp} = $is_temporary;
Bio/DB/Taxonomy/sqlite.pm view on Meta::CPAN
# one file. Mayeb ignore it in favor of having full path for db_name?
my ($dir, $db_name) = ($self->index_directory, $self->db_name);
if (! -e $db_name || $force) {
# TODO: we're ignoring index_directory for now, may add support for this
# down the way
my $dbh = DBI->connect("dbi:SQLite:dbname=$db_name","","") or die $!;
$self->debug("Running SQLite version:".$dbh->{sqlite_version}."\n");
#$dbh->do('PRAGMA synchronous = 0'); # Non transaction safe!!!
if ($self->cache_size) {
my $cs = $self->cache_size;
$self->debug("Setting cache size $cs\n");
$dbh->do("PRAGMA cache_size = $cs")
}
$self->debug("Loading taxon table data\n");
$self->_init_db($dbh);
open my $NODES, '<', $nodesfile
Bio/DB/Taxonomy/sqlite.pm view on Meta::CPAN
$self->debug("Creating taxon index\n");
$dbh->do("CREATE INDEX parent_idx ON taxon (parent_id)") or $self->throw($dbh->errstr);
$self->debug("Creating name index\n");
$dbh->do("CREATE INDEX name_idx ON names (name)") or $self->throw($dbh->errstr);
$self->debug("Creating taxon name table index\n");
$dbh->do("CREATE INDEX taxon_name_idx ON names (taxon_id)") or $self->throw($dbh->errstr);
$dbh->do("PRAGMA foreign_keys = ON");
#$dbh->do('PRAGMA synchronous = 1');
$self->{dbh} = $dbh;
$self->{'_initialized'} = 1;
}
1;
}
# connect the internal db handle
sub _db_connect {
my $self = shift;
return if $self->{'_initialized'};
Bio/Root/Version.pm view on Meta::CPAN
# ensure we're using an up-to-date BioPerl distribution
use Bio::Perl 3.14;
# NiftyFeature has its own versioning scheme:
use Bio::Tools::NiftyFeature 9.8;
=head1 DESCRIPTION
This module provides a mechanism by which all other BioPerl modules
can share the same $VERSION, without manually synchronizing each file.
Bio::Root::RootI itself uses this module, so any module that directly
(or indirectly) uses Bio::Root::RootI will get a global $VERSION
variable set if it's not already.
=head1 AUTHOR Aaron Mackey
=cut
our $VERSION = '1.007002';
Bio/SimpleAnalysisI.pm view on Meta::CPAN
=head1 SYNOPSIS
This is an interface module - you do not instantiate it.
Use other modules instead (those that implement this interface).
=head1 DESCRIPTION
This interface contains public methods for accessing and controlling
local and remote analysis tools. It is meant to be used on the client
side. The interface consists only of a necessary set of methods for
synchronous invocation of analysis tools. For more complex set,
including an asynchronous access, see interface C<Bio::AnalysisI>
(which inherits from this one, by the way).
=head1 FEEDBACK
=head2 Mailing Lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
Bio/SimpleAnalysisI.pm view on Meta::CPAN
Usage : $tool->run ( ['sequence=@my.seq', 'osformat=embl'] )
Returns : $self
Args : data and parameters for this execution
(in various formats)
Create a job, start it, and wait for its completion. The method is
identical to the method C<wait_for>. Why there are two methods doing
the same? Because it is expected that the sub-classes may implement
them differently (an example is an interface C<Bio::AnalysisI> which
uses method C<run> for an asynchronous execution and method
C<wait_for> for a synchronous one.
Usually, after this call, you ask for results of the finished job:
$analysis->run (...)->result;
The input data and prameters for this execution can be specified in
various ways:
=over
t/data/genewise.out view on Meta::CPAN
Subs error: 1e-05
Indel error: 1e-05
Model splice? model
Model codon bias? flat
Model intron bias? tied
Null model syn
Algorithm 623
genewise output
Score 2054.68 bits over entire alignment
Scores as bits over a synchronous coding model
Warning: The bits scores is not probablistically correct for single seqs
See WWW help for more info
SINFRUP00000067 1 LDEDQLSHSSSRLSRSPLKGVKKAKIMQCKVTLLDNSDYTIDVE
LDEDQLSHSSSRLSRSPLKGVKKAKIMQCKVTLLDNSDYTIDVE
LDEDQLSHSSSRLSRSPLKGVKKAKIMQCKVTLLDNSDYTIDVE
Scaffold_2042.122265 cgggcttcaaacctatccaggaagaaactagatcgatgtaaggg
taaaatcaggggtcgcctagtaacattagatcttaacaactata
gcgcgactccttccgtcgaacgaggaggtacaggcccccattag
t/data/tol-2010-02-18.nhx view on Meta::CPAN
(((aquifex[&&NHX:TOL=59615],calderobacterium[&&NHX:TOL=59616],hydrogenobacter[&&NHX:TOL=59617],thermocrinis[&&NHX:TOL=59618],hydrogenothermus[&&NHX:TOL=59619],persephonella[&&NHX:TOL=59620],sulfurihydrogenibium[&&NHX:TOL=59621],balnearium[&&NHX:TOL=5...
( run in 0.307 second using v1.01-cache-2.11-cpan-0d8aa00de5b )