Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/p/y/pycogent-HEAD/tests/test_core/test_annotation.py   pycogent(Download)
from cogent import DNA, LoadSeqs
from cogent.core.annotation import Feature, Variable, _Feature
from cogent.core.location import Map, Span, as_map
 
__author__ = "Gavin Huttley"
 
        seq = DNA.makeSequence('ACGTACGTACGT')
        f = seq.addAnnotation(NewFeat, as_map([(1,3), (5,7)], len(seq)),
                                type='gene', Name='abcd')
        self.assertEqual(type(f.asOneSpan()), NewFeat)
        self.assertEqual(type(f.getShadow()), NewFeat)
        f2 = seq.addAnnotation(NewFeat, as_map([(3,5)], len(seq)),