def runAnnotator( tmpdir, outfile, 
                  tmpannotations, 
                  tmpsegments, 
                  tmpworkspaces, 
                  tmpsynonyms,
                  options = ""):

    if tmpsegments == None:
        E.warn( "no segments - annotator not run for %s" % outfile )
        return

    if tmpannotations == None:
        E.warn( "no annotations - annotator not run for %s" % outfile )
        return
 
    to_cluster = True
    job_queue = "medium_jobs.q"
    job_options = "-l mem_free=8000M"

    workspace_options = ""
    for x,workspace in enumerate( tmpworkspaces ):
        if x == 0:
            workspace_options += " -workspace %s" % workspace
        else:
            workspace_options += " -workspace%i %s" % (x+1, workspace)

    if tmpsynonyms:
        workspace_options += " -synonyms %s" % tmpsynonyms
          

    statement = '''
    java -Xmx8000M -cp %(annotator_dir)s/commons-cli-1.0.jar:%(annotator_dir)s/Annotator.jar app.Annotator \
    -verbose 4 -iterations %(annotator_iterations)s \
    -annotation %(tmpannotations)s \
    -segments %(tmpsegments)s \
    %(workspace_options)s \
    %(options)s \
    > %(outfile)s '''
    
    P.run()

############################################################
############################################################
############################################################
## import annotator GO results
############################################################
If max_pvalue and max_qvalue are given, they are
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_vitaminD_annotator.py/runAnnotator--crossover with--dataset/ETHPy150Open CGATOxford/cgat/scripts/go2svg.py/GoPlot.__init__