@transform( thresholdFoldChange, suffix(".foldchange"), ".foldchange.load")
def loadFoldChangeThreshold(infile, outfile):
    track = P.snip( os.path.basename( infile ), ".foldchange" ).replace(".","_").replace("-","_")
    header = "threshold,intervals"
    statement = '''cat %(infile)s | python %(scriptsdir)s/csv2db.py
                      --table=%(track)s_foldchange
                      --header=%(header)s
                   > %(outfile)s '''
    P.run()

############################################################
Load intervals overlapping chipseq into database
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj012_chipseq.py/loadFoldChangeThreshold