@transform( copyCapseqReplicatedBedFiles, suffix(".bed"), ".control.composition" )
def annotateControlComposition( infile, outfile ):
    to_cluster = True
    track= P.snip( os.path.basename(infile), ".bed")
    dirname= os.path.dirname(infile)
    statement = """cat %(infile)s | python %(scriptsdir)s/bed2bed.py -m shift -g %(genome_dir)s/%(genome)s --offset=-10000 -S %(track)s.control.bed;
                   cat %(track)s.control.bed
                   | python %(scriptsdir)s/bed2gff.py --as-gtf 
                   | python %(scriptsdir)s/gtf2table.py 
                      	 --counter=composition-cpg
                      	 --log=%(outfile)s.log
                         --genome-file=%(genome_dir)s/%(genome)s
                   > %(outfile)s; """
    P.run()

############################################################
Establish the nucleotide composition of control intervals
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/annotateControlComposition