def test_run(self): gs = gelscore.Sequence('ACDEFGHIKLMNPQRSTVWY') gs1 = gelscore.ContiguousRegion(gs, 0, 5) gs2 = gelscore.ContiguousRegion(gs, 15, 20) [left, right] = gs1.difference(gs2) self.assertTrue(str(left) == str(gs1)) self.assertTrue(str(right) == str(gs2))
def test_run(self): gs = gelscore.Sequence('ACDEFGHIKLMNPQRSTVWY') gs1 = gelscore.ContiguousRegion(gs, 0, 10) gs2 = gelscore.ContiguousRegion(gs, 5, 15) #print gs1.composition #print gs2.composition gs3 = gs1.intersection(gs2) #print gs3 self.assertTrue(str(gs3) == 'GHIKL')
def test_run(self): gs = gelscore.Sequence('MSEAQETHVEQLPESVVDAPVEEQHQEPPQAPDAPQEPQVPQESAPQESAPQEPPAPQEQNDVPPPSNAPIYEGEESHSVQDYQEAHQHHQPPEPQPYYPPPPPGEHMHGRPPMHHRQEGELSNTRLFVRPFPLDVQESELNEIFGPFGPMKEVKILNGFAFVEFEEAESAAKAIEEVHGKSFANQPLEVVYSKLPAKRYRITMKNLPEGCSWQDLKDLARENSLETTFSSVNTRDFDGTGALEFPSEEILVEALERLNNIEFRGSVITVERDDNPPPIRRSNRGGFRGRGGFRGGFRGGFRGGFSRGGFGGPRGGFGGPRGGYGGYSRGGYGGYSRGGYGGSRGGYDSPRGGYDSPRGGYSRGGYGGPRNDYGPPRGSYGGSRGGYDGPRGDYGPPRDAYRTRDAPRERSPTR') gs1 = gelscore.ContiguousRegion(gs, 74, 106) gs2 = gelscore.ContiguousRegion(gs, 88, 111) #print gs1.composition #print gs2.composition gs3 = gs1.intersection(gs2) #print gs3.start self.assertTrue(gs3.start==88) self.assertTrue(gs3.end==106)
def test_run(self): gs = gelscore.Sequence('ACDEFGHIKLMNPQRSTVWY') gs1 = gelscore.ContiguousRegion(gs) gs1.trimright(2) self.assertTrue(gs1[-1] == 'V')
def test_run(self): gs = gelscore.Sequence('ACDEFGHIKLMNPQRSTVWY') gs1 = gelscore.ContiguousRegion(gs, 0, 5) gs2 = gelscore.ContiguousRegion(gs, 5, 10) gs3 = gs1.merge(gs2)
def test_run(self): gs = gelscore.Sequence('ACDEFGHIKLMNPQRSTVWY') gs1 = gelscore.ContiguousRegion(gs, 0, 5) gs2 = gelscore.ContiguousRegion(gs, 15, 20) inter = gs1.intersection(gs2) self.assertTrue(inter is None)