Retrieve oncofuse arguments supplied through input configuration.
    tissue_type is the library argument, which tells Oncofuse to use its
    own pre-built gene expression libraries. There are four pre-built
    libraries, corresponding to the four supported tissue types:
    EPI (epithelial origin),
    HEM (hematological origin),
    MES (mesenchymal origin) and
    AVG (average expression, if tissue source is unknown).

def _oncofuse_tissue_arg_from_config(data):

    """Retrieve oncofuse arguments supplied through input configuration.
    tissue_type is the library argument, which tells Oncofuse to use its
    own pre-built gene expression libraries. There are four pre-built
    libraries, corresponding to the four supported tissue types:
    EPI (epithelial origin),
    HEM (hematological origin),
    MES (mesenchymal origin) and
    AVG (average expression, if tissue source is unknown).
    """
    SUPPORTED_TISSUE_TYPE = ["EPI", "HEM", "MES", "AVG"]
    tissue_type = tz.get_in(("metadata", "tissue"), data, None)
    if not tissue_type:
        logger.info("Oncofuse: tissue type not set, using average expression (AVG).")
        tissue_type = "AVG"
    elif tissue_type not in SUPPORTED_TISSUE_TYPE:
        logger.info("Oncofuse: %s not a supported tissue type, using average "
                    "expression (AVG)." % tissue_type)
        tissue_type = "AVG"
    else:
        logger.info("Oncofuse: using %s as tissue type." % tissue_type)
    return tissue_type