Ejemplo n.º 1
0
def predictor_info(method):
    """
    Get all the information about a particular predictor/method from Fred2
    """

    predictor = EpitopePredictorFactory(method)
    try:
        is_in_path = predictor.is_in_path()
    except:
        is_in_path = None
    try:
        command = predictor.command
    except:
        command = None

    method_hash = {
        "syfpeithi": "T-cell epitope",
        "bimas": "MHC-I binding",
        "svmhc": "MHC-I binding",
        "arb": "MHC-I binding",
        "smm": "MHC-I binding",
        "smmpmbec": "MHC-I binding",
        "epidemix": "MHC-I binding",
        "comblib": "MHC-I binding",
        "comblibsidney": "MHC-I binding",
        "pickpocket": "MHC-I binding",
        "netmhc": "MHC-I binding",
        "netmhcpan": "MHC-I binding",
        "hammer": "MHC-II binding",
        "tepitopepan": "MHC-II binding",
        "netmhcii": "MHC-II binding",
        "netmhciipan": "MHC-II binding",
        "unitope": "T-cell epitope",
        "netctlpan": "T-cell epitope",
    }

    retdict = {
        "is_in_path": is_in_path,
        "name": method,
        "supportedAlleles": predictor.supportedAlleles,
        "supportedLength": predictor.supportedLength,
        "command": command,
        "version": predictor.version,
        "type": method_hash.get(method)
    }
    return retdict