@transform( getCapseqOverlap, suffix(".capseq"), ".capseq.load")
def loadCapseqIntervals(infile, outfile):
    track = P.snip( os.path.basename( infile ), ".capseq" ).replace(".","_").replace("-","_")
    header = "track,overlap"
    statement = '''cat %(infile)s | python %(scriptsdir)s/csv2db.py
                      --database=%(database)s
                      --table=%(track)s_capseq
                      --header=%(header)s
                      --allow-empty
                   > %(outfile)s '''
    P.run()

############################################################
############################################################
## Compare intervals to external bed files using GAT
Verified that all required data is present in the context and
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/loadCapseqIntervals--crossover with--dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/horizon/workflows/base.py/Workflow.is_valid