@follows( exportUCSCEncodeTracks, buildAnnotatorGC )
@files( [ ((x % "%s.bed", "ucsc_encode.bed"), "%s.annotator_promotors" % x ) for x in TRACKS_ANNOTATOR ] )
def makeAnnotatorPromotors( infiles, outfile ):
    '''check statistical overlap between intervals and selected ucsc tracks

    Annotator is run with the following parameters:
    1. Segments: the interval track
    2. Annotations:
       1. ucsc encode features
    3. Workspace:
       1. the mappable part of the genome
       2. GC controlled
    '''

    infile, infile_annotations = infiles
    tmpdir = P.getTempDir( dir = os.getcwd() )

    annotations = PAnnotator.buildAnnotatorAnnotations( tmpdir, outfile, bedfiles=(infile_annotations,) )
    
    workspaces, synonyms = PAnnotator.buildAnnotatorWorkSpace( tmpdir, outfile,
                                                    workspaces = ("mappable", "promotors"),
                                                    gc_control = True )

    segments = PAnnotator.buildAnnotatorSegments( tmpdir, infile, outfile )

    PAnnotator.runAnnotator( tmpdir, outfile, annotations, segments, workspaces, synonyms )

    shutil.rmtree( tmpdir )

############################################################
############################################################
############################################################
##
############################################################
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_vitaminD.py/makeAnnotatorPromotors/swapped operands of `%`