Back to index

python-biopython  1.60
Functions | Variables
test_KEGG Namespace Reference

Functions

def t_KEGG_Enzyme
def t_KEGG_Compound
def t_KEGG_Map

Variables

list test_KEGG_Enzyme_files = ["enzyme.sample", "enzyme.irregular"]
list test_KEGG_Compound_files = ["compound.sample", "compound.irregular"]
list test_KEGG_Map_files = ["map00950.rea"]

Detailed Description

Tests the basic functionality of the KEGG parsers.

Function Documentation

def test_KEGG.t_KEGG_Compound (   testfiles)
Tests Bio.KEGG.Compound functionality.

Definition at line 26 of file test_KEGG.py.

00026 
00027 def t_KEGG_Compound(testfiles):
00028     """Tests Bio.KEGG.Compound functionality."""
00029     for file in testfiles:
00030         fh = open(os.path.join("KEGG", file))
00031         print "Testing Bio.KEGG.Compound on " + file + "\n\n"
00032         records = Compound.parse(fh)
00033         for record in records:
00034             print record
00035         print "\n"
00036         fh.close()

Here is the call graph for this function:

Here is the caller graph for this function:

def test_KEGG.t_KEGG_Enzyme (   testfiles)
Tests Bio.KEGG.Enzyme functionality.

Definition at line 15 of file test_KEGG.py.

00015 
00016 def t_KEGG_Enzyme(testfiles):
00017     """Tests Bio.KEGG.Enzyme functionality."""
00018     for file in testfiles:
00019         fh = open(os.path.join("KEGG", file))
00020         print "Testing Bio.KEGG.Enzyme on " + file + "\n\n"
00021         records = Enzyme.parse(fh)
00022         for record in records:
00023             print record
00024         print "\n"
00025         fh.close()

Here is the call graph for this function:

Here is the caller graph for this function:

def test_KEGG.t_KEGG_Map (   testfiles)
Tests Bio.KEGG.Map functionality.

Definition at line 37 of file test_KEGG.py.

00037 
00038 def t_KEGG_Map(testfiles):
00039     """Tests Bio.KEGG.Map functionality."""
00040     for file in testfiles:
00041         fh = open(os.path.join("KEGG", file))
00042         print "Testing Bio.KEGG.Map on " + file + "\n\n"
00043         reactions = Map.parse(fh)
00044         system = System()
00045         for reaction in reactions:
00046             system.add_reaction(reaction)
00047         # sort the reaction output by the string names, so that the
00048         # output will be consistent between python versions
00049         #def str_cmp(first, second):
00050         #    return cmp(str(first), str(second))
00051         rxs = system.reactions()
00052         #sort: key instead of compare function (for py3 support)
00053         #  The function str_cmp above can be removed if the
00054         #  solution below proves resilient
00055         rxs.sort(key=lambda x:str(x))
00056         for x in rxs:
00057             print str(x)
00058         fh.close()
00059 
00060 
00061 t_KEGG_Enzyme(test_KEGG_Enzyme_files)
00062 t_KEGG_Compound(test_KEGG_Compound_files)
00063 t_KEGG_Map(test_KEGG_Map_files)
00064 
00065 

Here is the call graph for this function:


Variable Documentation

list test_KEGG.test_KEGG_Compound_files = ["compound.sample", "compound.irregular"]

Definition at line 12 of file test_KEGG.py.

list test_KEGG.test_KEGG_Enzyme_files = ["enzyme.sample", "enzyme.irregular"]

Definition at line 11 of file test_KEGG.py.

list test_KEGG.test_KEGG_Map_files = ["map00950.rea"]

Definition at line 13 of file test_KEGG.py.