def testExperiment(self): readGroup = self.getReadGroup() readGroupSet = readGroup.getParentContainer() dataset = readGroupSet.getParentContainer() localId = "experiment" cid = datamodel.ExperimentCompoundId(readGroup.getCompoundId(), localId) self.assertRaises(ValueError, datamodel.ExperimentCompoundId, readGroup.getCompoundId()) self.assertEqual(cid.dataset, dataset.getLocalId()) self.assertEqual(cid.read_group_set, readGroupSet.getLocalId()) self.assertEqual(cid.read_group, readGroup.getLocalId()) self.assertEqual(cid.experiment, localId)
def getExperimentId(self): """ Returns the id of the experiment used for this read group """ return str( datamodel.ExperimentCompoundId(self.getCompoundId(), 'experiment'))