Trees | Indices | Help |
---|
|
object --+ | list --+ | object --+ | | | Feature --+ | FeatureAggregate
>>> feature1_1 = Feature(location=easy.LocationFromString("NC_001802x.fna:336..1631"), frame=0) # gag-pol >>> feature1_2 = Feature(location=easy.LocationFromString("NC_001802x.fna:1631..4642"), frame=0) # slippage >>> aggregate = FeatureAggregate([feature1_1, feature1_2]) >>> print aggregate.location() join(NC_001802x.fna:336..1631,NC_001802x.fna:1631..4642) >>> xlate_str = aggregate.translate().tostring() >>> xlate_str[:5], xlate_str[-5:] ('MGARA', 'RQDED')
>>> location1 = easy.LocationFromString("NC_001802x.fna:complement(1..6)") >>> location2 = easy.LocationFromString("NC_001802x.fna:complement(7..12)") >>> feature2_1 = Feature(location=location1, frame=0) >>> feature2_2 = Feature(location=location2, frame=0) >>> aggregate2 = FeatureAggregate([feature2_1, feature2_2]) >>> print aggregate2.location() complement(join(NC_001802x.fna:1..6,NC_001802x.fna:7..12)) >>> print aggregate2.translate() Seq('TRET', HasStopCodon(IUPACProtein(), '*')) >>> location1.reverse() >>> location2.reverse() >>> aggregate3 = FeatureAggregate([Feature(location=x, frame=0) for x in [location1, location2]]) >>> print aggregate3.location() join(NC_001802x.fna:1..6,NC_001802x.fna:7..12) >>> print aggregate3.translate() Seq('GLSG', HasStopCodon(IUPACProtein(), '*')) >>> aggregate3[0].frame = 3 >>> print aggregate3.translate() Seq('LSG', HasStopCodon(IUPACProtein(), '*'))
>>> aggregate4 = FeatureAggregate() >>> aggregate4.append(Feature(location=easy.LocationFromString("NC_001802x.fna:1..5"), frame=0)) >>> aggregate4.append(Feature(location=easy.LocationFromString("NC_001802x.fna:6..12"), frame=2)) >>> aggregate4.seq() Seq('GGTCTCTCTGGT', Alphabet()) >>> aggregate4.translate() Seq('GLSG', HasStopCodon(IUPACProtein(), '*'))
|
|||
new list |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
|
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Sep 22 19:31:54 2009 | http://epydoc.sourceforge.net |