@follows( mkdir("tss") )
@files( os.path.join( PARAMS["geneset_dir"], PARAMS["geneset_transcript_tss"] ), "tss/tss.transcript.composition" )
def annotateTranscriptTSSComposition( infile, outfile ):
    to_cluster = True
    tss_extend = PARAMS["geneset_tss_extend"]
    statement = """zcat %(infile)s 
                   | slopBed -i stdin -g %(samtools_genome)s.fai -b %(tss_extend)s
                   | 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 tss intervals
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/annotateTranscriptTSSComposition