Exemplo n.º 1
0
 def operon_map(self):
     """Returns the operon map for this particular organism.
     Microbes Online works on VNG names, but RSAT is working on
     feature ids, so this function also maps VNG names to feature ids"""
     if not self.__operon_mappings:
         pairs = mo.get_operon_pairs(self.__microbes_online_db, self)
         synonyms = self.thesaurus()
         self.__operon_mappings = {synonyms[gene]: synonyms[head] for head, gene in pairs}
     return self.__operon_mappings
Exemplo n.º 2
0
    def test_make_operon_pairs(self):
        """test the make_operon_pairs() function in integration"""
        mo_db = MockMicrobesOnline('testdata/gnc64091_ref.named')
        organism = self.__make_organism()
        pairs = mo.get_operon_pairs(mo_db, organism)
        refpairs = self.__make_ref_operon_pairs()

        self.assertEquals(len(pairs), len(refpairs))
        for i in range(len(pairs)):
            self.assertEquals(refpairs[i], pairs[i])
Exemplo n.º 3
0
    def test_make_operon_pairs(self):
        """test the make_operon_pairs() function in integration"""
        mo_db = MockMicrobesOnline('testdata/gnc64091_ref.named')
        organism = self.__make_organism()
        pairs = mo.get_operon_pairs(mo_db, organism)
        refpairs = self.__make_ref_operon_pairs()

        self.assertEquals(len(pairs), len(refpairs))
        for i in range(len(pairs)):
            self.assertEquals(refpairs[i], pairs[i])
Exemplo n.º 4
0
 def operon_map(self):
     """Returns the operon map for this particular organism.
     Microbes Online works on VNG names, but RSAT is working on
     feature ids, so this function also maps VNG names to feature ids"""
     if not self.__operon_mappings:
         pairs = mo.get_operon_pairs(self.__microbes_online_db, self)
         synonyms = self.thesaurus()
         self.__operon_mappings = {
             synonyms[gene]: synonyms[head]
             for head, gene in pairs
         }
     return self.__operon_mappings