Exemplo n.º 1
0
 def test_synonyms(self):
     """ Test that we can add and retrieve synonyms. """
     c = Cell(name="ADAL", conf=self.config)
     c.synonym("lineage name: ABplapaaaapp")
     c.save()
     self.assertEqual(set(["lineage name: ABplapaaaapp"]),
                      Cell(name="ADAL").synonym())
Exemplo n.º 2
0
 def test_daughterOf(self):
     """
     Test that we can get the parent of a cell
     """
     base = "ab.tahsuetoahusenoat"
     child = base + "u"
     p = Cell(name="peas")
     p.lineageName(base)
     p.save()
     c = Cell(name="carrots")
     c.lineageName(child)
     c.save()
     parent_p = c.daughterOf().name()
     self.assertEqual("peas", parent_p)
Exemplo n.º 3
0
    def test_parentOf(self):
        """
        Test that we can get the children of a cell
        Tests for anterior, posterior, left, right, ventral, dorsal divisions
        """
        p = Cell(name="peas")
        base = 'ab.tahsuetoahusenoat'
        p.lineageName(base)
        p.save()

        c = ["carrots", "jam", "peanuts", "celery", "tuna", "chicken"]

        division_directions = "alvpdr"

        for x, l in zip(c, division_directions):
            ln = base + l
            Cell(name=x, lineageName=ln).save()
        names = set(str(x.name()) for x in p.parentOf())
        self.assertEqual(set(c), names)
Exemplo n.º 4
0
 def test_wormbaseID(self):
     """ Test that a Cell object has a wormbase ID """
     c = Cell(name="ADAL", conf=self.config)
     c.wormbaseID("WBbt:0004013")
     c.save()
     self.assertEqual("WBbt:0004013", Cell(name="ADAL").wormbaseID())
Exemplo n.º 5
0
 def test_lineageName(self):
     """ Test that we can retrieve the lineage name """
     c = Cell(name="ADAL", conf=self.config)
     c.lineageName("AB plapaaaapp")
     c.save()
     self.assertEqual("AB plapaaaapp", Cell(name="ADAL").lineageName())