def type(self, unit): """Compute the component type, ie A, C, G, U is RNA, DA, DC, etc is DNA and so forth. Parameters ---------- unit : Component The unit to get the component for Returns ------- component_type : str The component type. """ return units.component_type(unit)
def test_can_determine_is_rna(self): component = Component([], sequence='A') self.assertEquals('rna', units.component_type(component))
def test_gives_none_otherwise(self): component = Component([], sequence='gtp') self.assertEquals(None, units.component_type(component))
def test_can_determine_is_water(self): component = Component([], sequence='hoh') self.assertEquals('water', units.component_type(component))