def alignToSam(inputs, output, logger): if isPairedEnd: align1, [align2, seq1, seq2] = inputs runStage('alignToSamPE', logger, options, reference, align2, align2, seq1, seq2, output) else: align, [seq] = inputs runStage('alignToSamSE', logger, options, reference, align, seq, output)
def alignSequence(sequence, output, logger): runStage('alignSequence', logger, options, reference, sequence, output)
def varFilter(fullPileup, output, varPileup, chromName, chromLength, logger): runStage('varFilter', logger, options, fullPileup, varPileup, chromName, chromLength, output)
def illToSanger(sequence, output, logger): if sequence.endswith('.txt'): runStage('illToSanger', logger, options, sequence, output)
def mkRefDataBase(reference, output, logger): runStage('mkRefDataBase', logger, options, reference, output)
def pileup(baiFile, output, logger): (prefix, name, ext) = splitPath(baiFile) bamAlignFile = os.path.join(prefix, name) runStage('pileup', logger, options, reference, bamAlignFile, output)
def realign(inputs, output, logger): print inputs intervals, mergedBamsFile = inputs runStage('realign', logger, options, reference, mergedBamsFile, intervals, output)
def realignIntervals(mergedBamsFile, output, logger): runStage('realignIntervals', logger, options, reference, mergedBamsFile, output)
def indexMergedBams(mergedBamsFile, output, logger): runStage('indexMergedBams', logger, options, mergedBamsFile, output)
def pileupFull(bamFile, output, logger): runStage('pileupFull', logger, options, reference, bamFile, output)
def samToBam(samFile, output, logger): runStage('samToBam', logger, options, reference, samFile, output)
def alignToSam(inputs, output, logger): align1, [align2, seq1, seq2] = inputs runStage('alignToSam', logger, options, reference, align2, align2, seq1, seq2, output)
def variation(pileupFile, output, logger): runStage('variation', logger, options, pileupFile, output)
def indexReference(reference, output, logger): runStage('indexReference', logger, options, reference, output)
def samToBam(samFile, output, logger): indexedReference = reference + '.fai' runStage('samToBam', logger, options, indexedReference, samFile, output)
def mergeBams(sortedBams, output, logger): if len(sortedBams) == 1: shutil.copyfile(sortedBams[0], output) else: bams = ' '.join(sortedBams) runStage('mergeBams', logger, options, bams, output)
def sortBam(bamFile, output, logger): (prefix, name, ext) = splitPath(output) outFile = os.path.join(prefix, name) runStage('sortBam', logger, options, bamFile, outFile)
def sortBam(bamFile, output, logger): (prefix, name, ext) = splitPath(output) outFile = os.path.join(prefix,name) runStage('sortBam', logger, options, bamFile, outFile)
def callSNPs(bamFile, output, logger): runStage('callSNPs', logger, options, reference, bamFile, output)