def testConvertLocationHgvsC(self): loc = protocol.AlleleLocation() loc.start = 430 loc.referenceSequence = "T" loc.alternateSequence = "A" hgvsC = "NM_001005484.1:c.431T>A" testLoc = self._variantAnnotationSet.convertLocationHgvsC(hgvsC) self.assertEqual(testLoc, loc)
def testConvertLocationHgvsP(self): loc = protocol.AlleleLocation() loc.start = 143 loc.alternateSequence = "Asn" loc.referenceSequence = "Ile" hgvsP = "NM_001005484.1:p.Ile144Asn" testLoc = self._variantAnnotationSet.convertLocationHgvsP(hgvsP) self.assertEqual(testLoc, loc)
def _createGaAlleleLocation(self): """ Convenience method to set the common fields in a AlleleLocation object. """ ret = protocol.AlleleLocation() ret.created = self._creationTime ret.updated = self._updatedTime return ret
def testAddLocations(self): effect = protocol.TranscriptEffect() effect.hgvsAnnotation = protocol.HGVSAnnotation() effect.hgvsAnnotation.protein = "NM_001005484.1:p.Ile144Asn" effect.hgvsAnnotation.transcript = "NM_001005484.1:c.431T>A" effect.proteinLocation = protocol.AlleleLocation() effect.cDNALocation = protocol.AlleleLocation() effect.CDSLocation = protocol.AlleleLocation() effect.proteinLocation.alternateSequence = "Asn" effect.proteinLocation.referenceSequence = "Ile" effect.proteinLocation.start = 143 effect.CDSLocation.alternateSequence = "A" effect.CDSLocation.referenceSequence = "T" effect.CDSLocation.start = 430 effect.cDNALocation.start = 430 protPos = "144/305" cdnaPos = "431/918" testEffect = self._variantAnnotationSet.addLocations( effect, protPos, cdnaPos) self.assertEqual(testEffect, effect)
def testConvertLocation(self): loc = protocol.AlleleLocation() loc.start = 150 pos = "151/305" testLoc = self._variantAnnotationSet.convertLocation(pos) self.assertEqual(testLoc, loc)