예제 #1
0
파일: Api.py 프로젝트: sivertkh/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.extract.TrackExtractor import TrackExtractor
    TrackExtractor.extractOneTrackManyRegsToOneFile(trackName, bins, outFileName, fileFormatName=fileFormatName, \
                                                    globalCoords=True, asOriginal=False, \
                                                    allowOverlaps=allowOverlaps)
예제 #2
0
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)
예제 #3
0
파일: Api.py 프로젝트: sivertkh/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.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
예제 #4
0
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