@transform(mergeBams, suffix('.bam'),
            ['.bam.bai', '.bam.indexMergedBams.Success'])
def indexMergedBams(inputs, outputs):
    """
    Index the merged bams using samtools.
    """
    bam, _success = inputs
    output, flag_file = outputs
    print os.path.basename(bam) % "samtools index on %s"
    runStageCheck('indexBam', flag_file, bam)
dataset/ETHPy150Open vlsci/variant_calling_pipeline/pipeline.py/indexMergedBams/swapped operands of `%`