def features_parse(features):
    """
    Extracts all valid lines in fiberassign features file to strings (i.e. no
    automatic processing of values to appropriate types).

    Args:
        features:   path to a features file

    Returns:
        dict with keys and values as features file.
    """
    d = dict()
    with open(features,'r') as f:
        for line in f.readlines():
            if line.startswith('-'): break
            if line.startswith('#'): continue
            try:
                w = line.index(' ')
            except ValueError:
                continue
            k = line[0:w]
            v = line[w+1:].strip()
            d[k] = v
    return d