def from_file(df, ann, n, path_to_file, sep=None):
    """Select first n features from a given file
    
    Parameters
    ----------
    df : pandas.DataFrame
        A pandas DataFrame whose rows represent samples
        and columns represent features.
    ann : pandas.DataFrame
        DataFrame with annotation of samples. This argument is
        actually not used by the function.
    n : int
        Number of features to select.
    path_to_file : str
        Path to a file which contains feature names in a first column.
        Path can be absolute or relative to the current working directory.
    sep : str
        Separator string using to identify first column in a given file.
        By default (None), any whitespace character will be used.

    Returns
    -------
    list
        List of first n entries in the intersection of features from a given file 
        with a list of features from a given DataFrame.
    """

    with open(path_to_file, "r") as f:
        features_from_file = [line.split(sep)[0] for line in f]
    
    return [feature for feature in features_from_file if feature in df.columns][:n]