def parse_protocol_from_path(spec_path, protocol_info):
    """
    Parses a specific CA imaging protocol information from a given path.
    :param spec_path: path containing the protocol information. e.g. "/egl3/urx/ramp210421/"
    :param protocol_info: information to be retrieved. Valid entries are
    "strain", "neuron", "prot_type", "o2conc".
    :return: string with the requested information or an empty string if the information
    could not be parsed.
    """
    prot_items = spec_path.strip("/").split("/")
    ret_val = ""
    if protocol_info == "strain":
        ret_val = prot_items[0]
    elif protocol_info == "neuron":
        ret_val = prot_items[1].upper()
    elif protocol_info == "prot_type":
        if "ramp" in prot_items[2].lower():
            ret_val = "ramp"
        elif "shift" in prot_items[2].lower():
            ret_val = "shift"
    elif protocol_info == "o2conc":
        ret_val = prot_items[2].lower().replace("shift", "").replace("ramp", "")

    return ret_val