@files_re( buildNormalizedBAM,
           "(.*).normbam",
           r"\1.macs" )
def runMACS( infile, outfile ):

    to_cluster = False

    track = infile[:-len("normbam")]
    try:
        control = pipeline_vitaminD.getControl( track ) + ".bam"
    except AssertionError:
        return

    statement = '''
    macs -t %(infile)s -c %(control)s \
          --name=%(outfile)s \
          --format=bam --tsize=35 --bw=110 --mfold=8 --gsize=6000000 >& %(outfile)s''' 

    P.run( **dict( locals().items() + PARAMS.items() ) )

@follows( remapWithBowtie, buildBigwig, runMACS )
def full():
    pass

if __name__== "__main__":
    P.checkFiles( ("genome.fasta", "genome.idx" ) )
    P.checkExecutables( ("liftOver",) )
    sys.exit( P.main(sys.argv) )