コード例 #1
0
ファイル: markDups.py プロジェクト: lucasnell/GATKpipe
def runMarkDups(filePath):
    
    """Run command to mark duplicates in BAM file."""
    
    directory, filename = base.splitPath(filePath)
    
    command = base.markDups % {'bam': filename}
    
    logFileName = '_'.join(filePath.split('_')[:-1] + ['mD.log'])
    
    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')
    return
コード例 #2
0
ファイル: reIndels.py プロジェクト: lucasnell/GATKpipe
def runReIndels(filePath, coreString):
    
    """Run command to do local realignment around indels on BAM file."""
    
    directory, filename = base.splitPath(filePath)
    
    command = base.reIndels % {'bam': filename, 'ref': ref, 'corS': coreString}
    
    logFileName = '_'.join(filePath.split('_')[:-1] + ['rI.log'])
    
    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')
    
    return
コード例 #3
0
def runAddRG(filePath):
    
    """Run command to add read groups to BAM file and index new one."""
    
    directory, filename = base.splitPath(filePath)
    
    command = base.addRG % {'bam': filename}
    
    logFileName = filePath.replace('.bam', '_rG.log')
    
    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')
    
    return
コード例 #4
0
ファイル: callVars.py プロジェクト: lucasnell/GATKpipe
def runCallVariants(filePath, coreString):
    
    """Run command to call variants on BAM file."""
    
    directory, filename = base.splitPath(filePath)
    
    command = base.callVariants % {'bam': filename, 'ref': ref, 'corS': coreString}
    
    logFileName = '_'.join(filePath.split('_')[:-1] + ['cV.log'])
    
    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')
    
    return
コード例 #5
0
def runMarkDups(filePath):
    """Run command to mark duplicates in BAM file."""

    directory, filename = base.splitPath(filePath)

    command = base.markDups % {'bam': filename}

    logFileName = '_'.join(filePath.split('_')[:-1] + ['mD.log'])

    # Run command and save output to log file
    base.cleanRun(commandString=command,
                  logFile=logFileName,
                  workingDir=directory,
                  logOpenMode='wt')
    return
コード例 #6
0
def runCallVariants(filePath, coreString):
    
    """Run command to call variants on BAM file."""
    
    directory, filename = base.splitPath(filePath)
    
    command = base.callVariants % {'bam': filename, 'ref': ref, 'corS': coreString}
    
    logFileName = '_'.join(filePath.split('_')[:-1] + ['cV.log'])
    
    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')
    
    return
コード例 #7
0
def runJointGeno(filePath):

    """Run command to do joint genotyping on gVCF files."""

    directory, filename = base.splitPath(filePath)

    command = base.jointGeno % {'varS': varString, 'ref': ref, 'coreS': coreString,
                                'out': filename, 'moreOpts': moreOpts}

    logFileName = filePath + '_jG.log'

    # Run command and save output to log file
    base.cleanRun(commandString = command, logFile = logFileName,
                  workingDir = directory, logOpenMode = 'wt')

    return
コード例 #8
0
def runReIndels(filePath, coreString):
    """Run command to do local realignment around indels on BAM file."""

    directory, filename = base.splitPath(filePath)

    command = base.reIndels % {'bam': filename, 'ref': ref, 'corS': coreString}

    logFileName = '_'.join(filePath.split('_')[:-1] + ['rI.log'])

    # Run command and save output to log file
    base.cleanRun(commandString=command,
                  logFile=logFileName,
                  workingDir=directory,
                  logOpenMode='wt')

    return