Back to index

python-biopython  1.60
Public Member Functions
test_Motif.TestMAST Class Reference

List of all members.

Public Member Functions

def test_mast_parser_1
def test_mast_parser_2
def test_mast_parser_3

Detailed Description

Definition at line 1353 of file test_Motif.py.


Member Function Documentation

Test if Motif can parse MAST output files (first test)

Definition at line 1355 of file test_Motif.py.

01355 
01356     def test_mast_parser_1(self):
01357         """Test if Motif can parse MAST output files (first test)
01358         """
01359         from Bio.Alphabet import IUPAC
01360         from Bio.Motif.Parsers import MAST
01361         handle = open("Motif/mast.dna.oops.txt")
01362         record = MAST.read(handle)
01363         self.assertEqual(record.version, "3.0")
01364         self.assertEqual(record.database, "INO_up800.s")
01365         self.assertEqual(record.alphabet, IUPAC.unambiguous_dna)
01366         self.assertEqual(len(record.motifs), 2)
01367         self.assertEqual(record.motifs[0].alphabet, IUPAC.unambiguous_dna)
01368         self.assertEqual(record.motifs[0].length, 12)
01369         self.assertEqual(record.motifs[0].name, "1")
01370         self.assertEqual(record.motifs[1].alphabet, IUPAC.unambiguous_dna)
01371         self.assertEqual(record.motifs[1].length, 10)
01372         self.assertEqual(record.motifs[1].name, "2")
01373         self.assertEqual(len(record.sequences), 7)
01374         self.assertEqual(record.sequences[0], "ACC1")
01375         self.assertEqual(record.sequences[1], "CHO1")
01376         self.assertEqual(record.sequences[2], "INO1")
01377         self.assertEqual(record.sequences[3], "FAS1")
01378         self.assertEqual(record.sequences[4], "OPI3")
01379         self.assertEqual(record.sequences[5], "CHO2")
01380         self.assertEqual(record.sequences[6], "FAS2")
01381         self.assertEqual(record.diagrams["ACC1"], "82_[+1]_137_[+2]_559")
01382         self.assertEqual(record.diagrams["CHO1"], "152_[+2]_396_[-2]_42_[+1]_17_[+1]_149")
01383         self.assertEqual(record.diagrams["INO1"], "282_[-2]_327_[-1]_55_[+1]_102")
01384         self.assertEqual(record.diagrams["FAS1"], "43_[+2]_41_[+1]_694")
01385         self.assertEqual(record.diagrams["OPI3"], "185_[-2]_144_[+1]_449")
01386         self.assertEqual(record.diagrams["CHO2"], "353_[+1]_47_[-2]_378")
01387         self.assertEqual(record.diagrams["FAS2"], "184_[-2]_372_[+1]_222")
01388         handle.close()

Here is the call graph for this function:

Test if Motif can parse MAST output files (second test)

Definition at line 1389 of file test_Motif.py.

01389 
01390     def test_mast_parser_2(self):
01391         """Test if Motif can parse MAST output files (second test)
01392         """
01393         from Bio.Alphabet import IUPAC
01394         from Bio.Motif.Parsers import MAST
01395         handle = open("Motif/mast.protein.oops.txt")
01396         record = MAST.read(handle)
01397         self.assertEqual(record.version, "3.0")
01398         self.assertEqual(record.database, "adh.s")
01399         self.assertEqual(record.alphabet, IUPAC.protein)
01400         self.assertEqual(len(record.motifs), 2)
01401         self.assertEqual(record.motifs[0].alphabet, IUPAC.protein)
01402         self.assertEqual(record.motifs[0].length, 29)
01403         self.assertEqual(record.motifs[0].name, "1")
01404         self.assertEqual(record.motifs[1].alphabet, IUPAC.protein)
01405         self.assertEqual(record.motifs[1].length, 29)
01406         self.assertEqual(record.motifs[1].name, "2")
01407         self.assertEqual(len(record.sequences), 33)
01408         self.assertEqual(record.sequences[0], "BUDC_KLETE")
01409         self.assertEqual(record.sequences[1], "YRTP_BACSU")
01410         self.assertEqual(record.sequences[2], "AP27_MOUSE")
01411         self.assertEqual(record.sequences[3], "HDE_CANTR")
01412         self.assertEqual(record.sequences[4], "HDHA_ECOLI")
01413         self.assertEqual(record.sequences[5], "DHII_HUMAN")
01414         self.assertEqual(record.sequences[6], "FIXR_BRAJA")
01415         self.assertEqual(record.sequences[7], "DHGB_BACME")
01416         self.assertEqual(record.sequences[8], "NODG_RHIME")
01417         self.assertEqual(record.sequences[9], "RIDH_KLEAE")
01418         self.assertEqual(record.sequences[10], "YINL_LISMO")
01419         self.assertEqual(record.sequences[11], "DHMA_FLAS1")
01420         self.assertEqual(record.sequences[12], "HMTR_LEIMA")
01421         self.assertEqual(record.sequences[13], "2BHD_STREX")
01422         self.assertEqual(record.sequences[14], "ENTA_ECOLI")
01423         self.assertEqual(record.sequences[15], "DHB2_HUMAN")
01424         self.assertEqual(record.sequences[16], "BDH_HUMAN")
01425         self.assertEqual(record.sequences[17], "BA72_EUBSP")
01426         self.assertEqual(record.sequences[18], "FVT1_HUMAN")
01427         self.assertEqual(record.sequences[19], "GUTD_ECOLI")
01428         self.assertEqual(record.sequences[20], "DHB3_HUMAN")
01429         self.assertEqual(record.sequences[21], "3BHD_COMTE")
01430         self.assertEqual(record.sequences[22], "LIGD_PSEPA")
01431         self.assertEqual(record.sequences[23], "DHES_HUMAN")
01432         self.assertEqual(record.sequences[24], "RFBB_NEIGO")
01433         self.assertEqual(record.sequences[25], "BPHB_PSEPS")
01434         self.assertEqual(record.sequences[26], "YURA_MYXXA")
01435         self.assertEqual(record.sequences[27], "PCR_PEA")
01436         self.assertEqual(record.sequences[28], "DHCA_HUMAN")
01437         self.assertEqual(record.sequences[29], "ADH_DROME")
01438         self.assertEqual(record.sequences[30], "MAS1_AGRRA")
01439         self.assertEqual(record.sequences[31], "FABI_ECOLI")
01440         self.assertEqual(record.sequences[32], "CSGA_MYXXA")
01441         self.assertEqual(record.diagrams["BUDC_KLETE"], "2_[2]_120_[1]_61")
01442         self.assertEqual(record.diagrams["YRTP_BACSU"], "6_[2]_119_[1]_55")
01443         self.assertEqual(record.diagrams["AP27_MOUSE"], "7_[2]_112_[1]_67")
01444         self.assertEqual(record.diagrams["HDE_CANTR"], "8_[2]_125_[1]_131_[2]_115_[1]_411")
01445         self.assertEqual(record.diagrams["HDHA_ECOLI"], "11_[2]_74_[1]_15_[1]_68")
01446         self.assertEqual(record.diagrams["DHII_HUMAN"], "34_[2]_119_[1]_81")
01447         self.assertEqual(record.diagrams["FIXR_BRAJA"], "36_[2]_123_[1]_61")
01448         self.assertEqual(record.diagrams["DHGB_BACME"], "7_[2]_123_[1]_74")
01449         self.assertEqual(record.diagrams["NODG_RHIME"], "6_[2]_116_[1]_65")
01450         self.assertEqual(record.diagrams["RIDH_KLEAE"], "14_[2]_116_[1]_61")
01451         self.assertEqual(record.diagrams["YINL_LISMO"], "5_[2]_75_[2]_15_[1]_66")
01452         self.assertEqual(record.diagrams["DHMA_FLAS1"], "14_[2]_121_[1]_77")
01453         self.assertEqual(record.diagrams["HMTR_LEIMA"], "6_[2]_157_[1]_66")
01454         self.assertEqual(record.diagrams["2BHD_STREX"], "6_[2]_116_[1]_75")
01455         self.assertEqual(record.diagrams["ENTA_ECOLI"], "5_[2]_109_[1]_76")
01456         self.assertEqual(record.diagrams["DHB2_HUMAN"], "82_[2]_120_[1]_127")
01457         self.assertEqual(record.diagrams["BDH_HUMAN"], "55_[2]_123_[1]_107")
01458         self.assertEqual(record.diagrams["BA72_EUBSP"], "6_[2]_121_[1]_64")
01459         self.assertEqual(record.diagrams["FVT1_HUMAN"], "32_[2]_124_[1]_118")
01460         self.assertEqual(record.diagrams["GUTD_ECOLI"], "2_[2]_122_[1]_77")
01461         self.assertEqual(record.diagrams["DHB3_HUMAN"], "48_[2]_120_[1]_84")
01462         self.assertEqual(record.diagrams["3BHD_COMTE"], "6_[2]_115_[1]_74")
01463         self.assertEqual(record.diagrams["LIGD_PSEPA"], "6_[2]_121_[1]_120")
01464         self.assertEqual(record.diagrams["DHES_HUMAN"], "2_[2]_50_[2]_44_[1]_144")
01465         self.assertEqual(record.diagrams["RFBB_NEIGO"], "6_[2]_129_[1]_153")
01466         self.assertEqual(record.diagrams["BPHB_PSEPS"], "5_[2]_118_[1]_94")
01467         self.assertEqual(record.diagrams["YURA_MYXXA"], "65_[2]_22_[2]_14_[1]_70")
01468         self.assertEqual(record.diagrams["PCR_PEA"], "25_[1]_32_[2]_284")
01469         self.assertEqual(record.diagrams["DHCA_HUMAN"], "4_[2]_159_[1]_55")
01470         self.assertEqual(record.diagrams["ADH_DROME"], "6_[2]_116_[1]_75")
01471         self.assertEqual(record.diagrams["MAS1_AGRRA"], "245_[2]_74_[1]_14_[1]_56")
01472         self.assertEqual(record.diagrams["FABI_ECOLI"], "6_[2]_123_[1]_75")
01473         self.assertEqual(record.diagrams["CSGA_MYXXA"], "51_[2]_7_[1]_50")
01474         handle.close()

Here is the call graph for this function:

Test if Motif can parse MAST output files (third test)

Definition at line 1475 of file test_Motif.py.

01475 
01476     def test_mast_parser_3(self):
01477         """Test if Motif can parse MAST output files (third test)
01478         """
01479         from Bio.Alphabet import IUPAC
01480         from Bio.Motif.Parsers import MAST
01481         handle = open("Motif/mast.protein.tcm.txt")
01482         record = MAST.read(handle)
01483         self.assertEqual(record.version, "3.0")
01484         self.assertEqual(record.database, "farntrans5.s")
01485         self.assertEqual(record.alphabet, IUPAC.protein)
01486         self.assertEqual(len(record.motifs), 2)
01487         self.assertEqual(record.motifs[0].alphabet, IUPAC.protein)
01488         self.assertEqual(record.motifs[0].length, 30)
01489         self.assertEqual(record.motifs[0].name, "1")
01490         self.assertEqual(record.motifs[1].alphabet, IUPAC.protein)
01491         self.assertEqual(record.motifs[1].length, 14)
01492         self.assertEqual(record.motifs[1].name, "2")
01493         self.assertEqual(len(record.sequences), 5)
01494         self.assertEqual(record.sequences[0], "BET2_YEAST")
01495         self.assertEqual(record.sequences[1], "RATRABGERB")
01496         self.assertEqual(record.sequences[2], "CAL1_YEAST")
01497         self.assertEqual(record.sequences[3], "PFTB_RAT")
01498         self.assertEqual(record.sequences[4], "RAM1_YEAST")
01499         self.assertEqual(record.diagrams["BET2_YEAST"], "6_[2]_3_[1]_1_[2]_4_[1]_4_[2]_3_[1]_1_[2]_3_[1]_21_[1]_1_[2]_4_[1]_24")
01500         self.assertEqual(record.diagrams["RATRABGERB"], "65_[2]_3_[1]_1_[2]_3_[1]_1_[2]_3_[1]_18_[1]_1_[2]_4_[1]_26")
01501         self.assertEqual(record.diagrams["CAL1_YEAST"], "125_[2]_50_[2]_1_[1]_4_[2]_22_[1]_22_[1]_5_[2]_1")
01502         self.assertEqual(record.diagrams["PFTB_RAT"], "120_[2]_3_[1]_4_[2]_3_[1]_1_[2]_3_[1]_1_[2]_4_[1]_14_[2]_4_[1]_60")
01503         self.assertEqual(record.diagrams["RAM1_YEAST"], "144_[1]_5_[2]_4_[1]_1_[2]_4_[1]_1_[2]_4_[1]_4_[2]_5_[1]_35_[2]_4")
01504         handle.close()
01505 

Here is the call graph for this function:


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