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

Bio::GFF::Feature Class Reference

Inheritance diagram for Bio::GFF::Feature:

Bio::GFF::FeatureAggregate Bio::GFF::FeatureQueryRow

List of all members.


Detailed Description

strand may be:
+/0 = Watson
-/1 = Crick

I propose that we start calling these the Rosalind and Franklin strands

>>> RetrieveSeqname._dir = 'GFF'
>>> feature = Feature("NC_001802x.fna", 73, 78) # not having the x will interfere with the RetrieveSequence test
>>> feature.seq()
Seq('AATAAA', Alphabet())
>>> print feature.location()
NC_001802x.fna:73..78
>>> from Bio.SeqIO.FASTA import FastaWriter
>>> writer = FastaWriter(sys.stdout)
>>> writer.write(feature.record())
> NC_001802x.fna:73..78
AATAAA
>>> feature2 = Feature(location=easy.LocationFromString("NC_001802x.fna:73..78"))
>>> writer.write(feature2.record())
> NC_001802x.fna:73..78
AATAAA
>>> location3 = easy.LocationFromString("NC_001802x.fna:complement(73..78)")
>>> feature3 = Feature(location=location3)
>>> writer.write(feature3.record())
> NC_001802x.fna:complement(73..78)
TTTATT
>>> location4 = easy.LocationFromString("NC_001802x.fna:336..1631")
>>> feature4 = Feature(location=location4, frame=0)
>>> feature4.frame
0
>>> feature4.translate()[:7]
Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))
>>> feature4.frame = 6 # can't happen, but a useful demonstration
>>> feature4.translate()[:5]
Seq('ARASV', HasStopCodon(IUPACProtein(), '*'))
>>> feature4.frame = 1
>>> feature4.translate()[:5]
Seq('WVRER', HasStopCodon(IUPACProtein(), '*'))
>>> location5 = easy.LocationFromString("NC_001802lc.fna:336..1631") # lowercase data
>>> feature5 = Feature(location=location5, frame=0)
>>> feature5.translate()[:7]
Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))
>>> location6 = easy.LocationFromString("NC_001802lc.fna:335..351")
>>> feature6 = Feature(location=location6, frame=1)
>>> feature6.translate()
Seq('MGARA', HasStopCodon(IUPACProtein(), '*'))

Definition at line 121 of file __init__.py.


Public Member Functions

def __hash__
def __init__
def __str__
def id
def location
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