def _clean_subpath(subpath, delim="/"):
    """
    Add / to the subpath if needed to avoid partial s-exon matching.
    """
    first = subpath[0]
    last = subpath[len(subpath)-1]
    cleaned_subpath = ""
    if first != "s":  # start
        cleaned_subpath += delim
    cleaned_subpath += subpath
    if last != "p":  # stop 
        cleaned_subpath += delim
    return cleaned_subpath