Package obitools :: Package location :: Module feature
[hide private]
[frames] | no frames]

Module feature

source code

Classes [hide private]
  Feature
Functions [hide private]
iterator
textFeatureIterator(fttable)
Iterate through a textual description of a feature table in a genbank or embl format.
source code
iterator
qualifierIterator(qualifiers)
Parse a textual description of a feature in embl or genbank format as returned by the textFeatureIterator iterator and iterate through the key, value qualified defining this location.
source code
 
ftParser(feature) source code
 
featureFactory(featureDescription) source code
 
featureIterator(featureTable, skipError=False) source code
Variables [hide private]
  _featureMatcher = re.compile(r'(?m)^(FT| ) [^ ].+\n((FT| )...
  _featureCleaner = re.compile(r'(?m)^FT')
  _qualifierMatcher = re.compile(r'(?m)(?<=^ {21}/).+(\n {21}[^/...
  _qualifierCleanner = re.compile(r'(?m)^ +')
  _ftmatcher = re.compile(r'(?<=^ {5})\S+')
  _locmatcher = re.compile(r'(?s)(?<=^.{21})[^/]+')
  _cleanloc = re.compile(r'[\s\n]+')
  _qualifiersMatcher = re.compile(r'(?ms)^ +/.+')
  __package__ = 'obitools.location'

Imports: Location, locationGenerator, logging, sys, re


Function Details [hide private]

textFeatureIterator(fttable)

source code 

Iterate through a textual description of a feature table in a genbank or embl format. Return at each step a text representation of each individual feature composing the table.

Parameters:
  • fttable (str) - a string corresponding to the feature table of a genbank or an embl entry
Returns: iterator
an iterator on str

See Also: ftParser

qualifierIterator(qualifiers)

source code 

Parse a textual description of a feature in embl or genbank format as returned by the textFeatureIterator iterator and iterate through the key, value qualified defining this location.

Parameters:
  • qualifiers (str) - substring containing qualifiers
Returns: iterator
an iterator on tuple (key,value), where keys are str

Variables Details [hide private]

_featureMatcher

Value:
re.compile(r'(?m)^(FT|  )   [^ ].+\n((FT|  )    .+\n)+')

_qualifierMatcher

Value:
re.compile(r'(?m)(?<=^ {21}/).+(\n {21}[^/].+)*')