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
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
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
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
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
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
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