def get_ucsc_oreganno_track(url): "@return: Yield regions corresponding to the ORegAnno track in UCSC indexed by the URL." logging.info('Enumerating entry points to %s', url) entry_points = [id for id, start, stop, orientation in das.fetch_entry_points(url)] logging.info('Fetching ORegAnno features from %s', url) oreganno_segments = das.fetch_features(url, entry_points, types=('oreganno',)) for segment in oreganno_segments: id_ = segment.get('id') for feature in segment.findall('FEATURE'): label = feature.get('label') start = int(feature.find('START').text) end = int(feature.find('END').text) orientation = feature.find('ORIENTATION').text yield label, id_, start, end, orientation
def __init__(self, prefix): "Prefix specifies a DAS prefix for genome of interest." self.prefix = prefix self.entry_points = [ep for ep in das.fetch_entry_points(prefix)]