@follows(runGOOverlappedGeneLists)
@collate( "overlapped_genes/go/*/*.results", regex(r"overlapped_genes/go/(.*)/(.*)\.(.*).results"), r"overlapped_genes/go/\1/\3.revigo" )
def clusterGOResults( infiles, outfile ):
    infiles = " ".join(infiles)
    filename_go = os.path.join( PARAMS["geneset_dir"], PARAMS["go_full"])
    filename_obo = os.path.join( PARAMS["geneset_dir"], PARAMS["go_full_obo_xml"])
    to_cluster = True
    track = P.snip( outfile, ".revigo" )
    statement = '''cat %(infiles)s 
                   | python %(scriptsdir)s/revigo.py 
                      --filename-go=%(filename_go)s
                      --filename-ontology=%(filename_obo)s
                      --output-filename-pattern=%(track)s.%%s 
                      --ontology=all 
                      --max-similarity=0.5
                      --reverse-palette
                      --force 
                      -v 2 
                   > %(outfile)s'''
    P.run()
    
############################################################
## Intersection of H3K27Me3 intervals and overlapped genes
Test IsAdminUser() where no admins are defined.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/clusterGOResults--crossover with--dataset/ETHPy150Open google/simian/src/tests/simian/mac/common/auth_test.py/AuthModuleTest.testIsAdminUserBootstrap