def _commonExportFile(outFileName, genome, trackName, fileFormatName, allowOverlaps, bins): trackName = _convertTrackName(trackName) if not _trackNameExists(genome, trackName): return outFileName = os.path.abspath(outFileName) from gtrackcore.extract.TrackExtractor import TrackExtractor TrackExtractor.extractOneTrackManyRegsToOneFile(trackName, bins, outFileName, fileFormatName=fileFormatName, \ globalCoords=True, asOriginal=False, \ allowOverlaps=allowOverlaps)
def getExtractionOptions(genome, trackName): """genome trackName""" trackName = _convertTrackName(trackName) if not _trackNameExists(genome, trackName): return print print 'Available extraction options for track "%s" of genome "%s":' % (':'.join(trackName), genome) print print '{:<19}'.format('fileFormatName') + '{:<17}'.format('allowOverlaps') + 'Description' print '-'*80 from gtrackcore.extract.TrackExtractor import TrackExtractor for text, suffix in TrackExtractor.getTrackExtractionOptions(genome, trackName): fileFormatName, asOriginal, allowOverlaps = TrackExtractor.getAttrsFromExtractionFormat(text) print '{:<19}'.format(fileFormatName) + '{:<17}'.format(str(allowOverlaps)) + text