def getMetadataId(self, metadata): """ Returns the id of a metadata """ return str( datamodel.VariantSetMetadataCompoundId(self.getCompoundId(), 'metadata:' + metadata.key))
def testVariantSetMetadata(self): varSet = self.getVariantSet() dataSet = varSet.getParentContainer() localId = "metadata_key" cid = datamodel.VariantSetMetadataCompoundId(varSet.getCompoundId(), localId) self.assertRaises(ValueError, datamodel.VariantSetMetadataCompoundId, varSet.getCompoundId()) self.assertEqual(cid.dataset, dataSet.getLocalId()) self.assertEqual(cid.variant_set, varSet.getLocalId()) self.assertEqual(cid.key, localId)