예제 #1
0
파일: Api.py 프로젝트: henrikgs/gtrackcore
def _commonExportFile(outFileName, genome, trackName, fileFormatName, allowOverlaps, bins):
    trackName = _convertTrackName(trackName)
    if not _trackNameExists(genome, trackName):
        return

    outFileName = os.path.abspath(outFileName)

    from gtrackcore_memmap.extract.TrackExtractor import TrackExtractor

    TrackExtractor.extractOneTrackManyRegsToOneFile(
        trackName,
        bins,
        outFileName,
        fileFormatName=fileFormatName,
        globalCoords=True,
        asOriginal=False,
        allowOverlaps=allowOverlaps,
    )
예제 #2
0
파일: Api.py 프로젝트: henrikgs/gtrackcore
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_memmap.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