Back to index

python-biopython  1.60
Public Member Functions
test_BioSQL.TransferTest Class Reference

List of all members.

Public Member Functions

def test_NC_005816
def test_NC_000932
def test_NT_019265
def test_protein_refseq2
def test_no_ref
def test_one_of
def test_cor6_6
def test_arab1
def trans

Detailed Description

Test file -> BioSQL, BioSQL -> BioSQL.

Definition at line 520 of file test_BioSQL.py.


Member Function Documentation

GenBank file to BioSQL, then again to a new namespace, arab1.

Definition at line 553 of file test_BioSQL.py.

00553 
00554     def test_arab1(self):
00555         """GenBank file to BioSQL, then again to a new namespace, arab1."""
00556         self.trans("GenBank/arab1.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, cor6_6.

Definition at line 549 of file test_BioSQL.py.

00549 
00550     def test_cor6_6(self):
00551         """GenBank file to BioSQL, then again to a new namespace, cor6_6."""
00552         self.trans("GenBank/cor6_6.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, NC_000932.

Definition at line 529 of file test_BioSQL.py.

00529 
00530     def test_NC_000932(self):
00531         """GenBank file to BioSQL, then again to a new namespace, NC_000932."""
00532         self.trans("GenBank/NC_000932.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, NC_005816.

Definition at line 525 of file test_BioSQL.py.

00525 
00526     def test_NC_005816(self):
00527         """GenBank file to BioSQL, then again to a new namespace, NC_005816."""
00528         self.trans("GenBank/NC_005816.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, noref.

Definition at line 541 of file test_BioSQL.py.

00541 
00542     def test_no_ref(self):
00543         """GenBank file to BioSQL, then again to a new namespace, noref."""
00544         self.trans("GenBank/noref.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, NT_019265.

Definition at line 533 of file test_BioSQL.py.

00533 
00534     def test_NT_019265(self):
00535         """GenBank file to BioSQL, then again to a new namespace, NT_019265."""
00536         self.trans("GenBank/NT_019265.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, one_of.

Definition at line 545 of file test_BioSQL.py.

00545 
00546     def test_one_of(self):
00547         """GenBank file to BioSQL, then again to a new namespace, one_of."""
00548         self.trans("GenBank/one_of.gb", "gb")

Here is the call graph for this function:

GenBank file to BioSQL, then again to a new namespace, protein_refseq2.

Definition at line 537 of file test_BioSQL.py.

00537 
00538     def test_protein_refseq2(self):
00539         """GenBank file to BioSQL, then again to a new namespace, protein_refseq2."""
00540         self.trans("GenBank/protein_refseq2.gb", "gb")

Here is the call graph for this function:

def test_BioSQL.TransferTest.trans (   self,
  filename,
  format 
)

Definition at line 557 of file test_BioSQL.py.

00557 
00558     def trans(self, filename, format):
00559         original_records = list(SeqIO.parse(open(filename, "rU"), format))
00560         # now open a connection to load the database
00561         server = BioSeqDatabase.open_database(driver = DBDRIVER,
00562                                               user = DBUSER, passwd = DBPASSWD,
00563                                               host = DBHOST, db = TESTDB)
00564         db_name = "test_trans1_%s" % filename #new namespace!
00565         db = server.new_database(db_name)
00566         count = db.load(original_records)
00567         self.assertEqual(count, len(original_records))
00568         server.commit()
00569         #Now read them back...
00570         biosql_records = [db.lookup(name=rec.name) \
00571                           for rec in original_records]
00572         #And check they agree
00573         self.assertTrue(compare_records(original_records, biosql_records))
00574         #Now write to a second name space...
00575         db_name = "test_trans2_%s" % filename #new namespace!
00576         db = server.new_database(db_name)
00577         count = db.load(biosql_records)
00578         self.assertEqual(count, len(original_records))
00579         #Now read them back again,
00580         biosql_records2 = [db.lookup(name=rec.name) \
00581                           for rec in original_records]
00582         #And check they also agree
00583         self.assertTrue(compare_records(original_records, biosql_records2))
00584         #Done
00585         server.close()
00586 

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: