def find_annotations(data, retriever=None):
    """Find annotation configuration files for vcfanno, using pre-installed inputs.

    Creates absolute paths for user specified inputs and finds locally
    installed defaults.

    Default annotations:
      - gemini for variant pipelines
      - somatic for variant tumor pipelines
      - rnaedit for RNA-seq variant calling
    """
    conf_files = dd.get_vcfanno(data)
    if not isinstance(conf_files, (list, tuple)):
        conf_files = [conf_files]
    for c in _default_conf_files(data, retriever):
        if c not in conf_files:
            conf_files.append(c)
    conf_checkers = {"gemini": annotate_gemini, "somatic": _annotate_somatic}
    out = []
    annodir = os.path.normpath(os.path.join(os.path.dirname(dd.get_ref_file(data)), os.pardir, "config", "vcfanno"))
    if not retriever:
        annodir = os.path.abspath(annodir)
    for conf_file in conf_files:
        if objectstore.is_remote(conf_file) or (os.path.exists(conf_file) and os.path.isfile(conf_file)):
            conffn = conf_file
        elif not retriever:
            conffn = os.path.join(annodir, conf_file + ".conf")
        else:
            conffn = conf_file + ".conf"
        luafn = "%s.lua" % utils.splitext_plus(conffn)[0]
        if retriever:
            conffn, luafn = [(x if objectstore.is_remote(x) else None)
                             for x in retriever.add_remotes([conffn, luafn], data["config"])]
        if not conffn:
            pass
        elif conf_file in conf_checkers and not conf_checkers[conf_file](data, retriever):
            logger.warn("Skipping vcfanno configuration: %s. Not all input files found." % conf_file)
        elif not objectstore.file_exists_or_remote(conffn):
            build = dd.get_genome_build(data)
            CONF_NOT_FOUND = (
                "The vcfanno configuration {conffn} was not found for {build}, skipping.")
            logger.warn(CONF_NOT_FOUND.format(**locals()))
        else:
            out.append(conffn)
            if luafn and objectstore.file_exists_or_remote(luafn):
                out.append(luafn)
    return out
def find_annotations ( data , retriever = None ) : conf_files = dd . get_vcfanno ( data ) if not isinstance ( conf_files , ( list , tuple ) ) : conf_files = [ conf_files ] for c in _default_conf_files ( data , retriever ) : if c not in conf_files : conf_files . append ( c ) conf_checkers = { "gemini" : annotate_gemini , "somatic" : _annotate_somatic } out = [ ] annodir = os . path . normpath ( os . path . join ( os . path . dirname ( dd . get_ref_file ( data ) ) , os . pardir , "config" , "vcfanno" ) ) if not retriever : annodir = os . path . abspath ( annodir ) for conf_file in conf_files : if objectstore . is_remote ( conf_file ) or ( os . path . exists ( conf_file ) and os . path . isfile ( conf_file ) ) : conffn = conf_file elif not retriever : conffn = os . path . join ( annodir , conf_file + ".conf" ) else : conffn = conf_file + ".conf" luafn = "%s.lua" % utils . splitext_plus ( conffn ) [ 0 ] if retriever : conffn , luafn = [ ( x if objectstore . is_remote ( x ) else None ) for x in retriever . add_remotes ( [ conffn , luafn ] , data [ "config" ] ) ] if not conffn : pass elif conf_file in conf_checkers and not conf_checkers [ conf_file ] ( data , retriever ) : logger . warn ( "Skipping vcfanno configuration: %s. Not all input files found." % conf_file ) elif not objectstore . file_exists_or_remote ( conffn ) : build = dd . get_genome_build ( data ) CONF_NOT_FOUND = ( "The vcfanno configuration {conffn} was not found for {build}, skipping." ) logger . warn ( CONF_NOT_FOUND . format ( ** locals ( ) ) ) else : out . append ( conffn ) if luafn and objectstore . file_exists_or_remote ( luafn ) : out . append ( luafn ) return out
Find annotation configuration files for vcfanno, using pre-installed inputs.

    Creates absolute paths for user specified inputs and finds locally
    installed defaults.

    Default annotations:
      - gemini for variant pipelines
      - somatic for variant tumor pipelines
      - rnaedit for RNA-seq variant calling