Logo Search packages:      
Sourcecode: python-biopython version File versions

Bio::GFF::FeatureAggregate Class Reference

Inheritance diagram for Bio::GFF::FeatureAggregate:

Bio::GFF::Feature

List of all members.


Detailed Description

>>> 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(), '*'))

Definition at line 325 of file __init__.py.


Public Member Functions

def __hash__
def __init__
def __init__
def __str__
def id
def location
def map
def record
def seq
def target_location
def translate
def xrange

Public Attributes

 alphabet
 end
 frame
 seqname
 start
 strand

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index