@transform( getLongIntervalGeneGTF, suffix(".gtf.gz"), ".chromatin_profile.log" )    
def shortIntervalGeneChromatinProfile(infile, outfile):
    chromatin = P.asList(PARAMS["bigwig_chromatin"])
    track = P.snip( os.path.basename(infile), ".gtf.gz" )
    if len(chromatin[0]) > 0:
        for bw in chromatin:
            chromatin_track = P.snip( os.path.basename(bw), ".bam" )
            ofp = "long_intervals/" + track + ".genes." + chromatin_track + ".profile"    
            statement = '''python %(scriptsdir)s/bam2geneprofile.py 
                           --bamfile=%(bw)s 
                           --gtffile=%(infile)s
                           --output-filename-pattern=%(ofp)s
                           --reporter=gene
                           --method=geneprofile
                           --log=%(outfile)s
                           --normalize-profile=area
                           --normalize-profile=counts
                           --normalize-profile=none'''
            P.run()
    else:
        statement = '''touch %(outfile)s '''
        P.run()
                
############################################################
## Intersection of H3K27Me3 intervals and long interval genes
Returns the default URL for this dashboard.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/shortIntervalGeneChromatinProfile--crossover with--dataset/ETHPy150Open CiscoSystems/avos/horizon/base.py/Dashboard.get_absolute_url