Package BioSQL :: Module BioSeqDatabase :: Class BioSeqDatabase
[hide private]
[frames] | no frames]

Class BioSeqDatabase

source code

Instance Methods [hide private]
 
__init__(self, adaptor, name) source code
 
__repr__(self) source code
 
get_Seq_by_id(self, name)
Gets a Bio::Seq object by its name
source code
 
get_Seq_by_acc(self, name)
Gets a Bio::Seq object by accession number
source code
 
get_Seq_by_ver(self, name)
Gets a Bio::Seq object by version number
source code
 
get_Seqs_by_acc(self, name)
Gets a *list* of Bio::Seq objects by accession number
source code
 
get_PrimarySeq_stream(self) source code
 
get_all_primary_ids(self)
Array of all the primary_ids of the sequences in the database.
source code
 
__getitem__(self, key) source code
 
keys(self) source code
 
values(self) source code
 
items(self) source code
 
lookup(self, **kwargs) source code
 
get_Seq_by_primary_id(self, seqid)
Gets a Bio::Seq object by the primary (internal) id.
source code
 
load(self, record_iterator)
Load a set of SeqRecords into the BioSQL database.
source code
Method Details [hide private]

get_Seq_by_id(self, name)

source code 

Gets a Bio::Seq object by its name

Example: seq = db.get_Seq_by_id('ROA1_HUMAN')

get_Seq_by_acc(self, name)

source code 

Gets a Bio::Seq object by accession number

Example: seq = db.get_Seq_by_acc('X77802')

get_Seq_by_ver(self, name)

source code 

Gets a Bio::Seq object by version number

Example: seq = db.get_Seq_by_ver('X77802.1')

get_Seqs_by_acc(self, name)

source code 

Gets a *list* of Bio::Seq objects by accession number

Example: seqs = db.get_Seq_by_acc('X77802')

get_all_primary_ids(self)

source code 

Array of all the primary_ids of the sequences in the database.

These maybe ids (display style) or accession numbers or something else completely different - they *are not* meaningful outside of this database implementation.

get_Seq_by_primary_id(self, seqid)

source code 

Gets a Bio::Seq object by the primary (internal) id.

The primary id in these cases has to come from $db->get_all_primary_ids. There is no other way to get (or guess) the primary_ids in a database.

load(self, record_iterator)

source code 

Load a set of SeqRecords into the BioSQL database.

record_iterator is either a list of SeqRecord objects, or an Iterator object that returns SeqRecord objects (such as the output from the Bio.SeqIO.parse() function), which will be used to populate the database.

Example: from Bio import SeqIO count = db.load(SeqIO.parse(open(filename), format))

Returns the number of records loaded.