oktoberfest.pp.load_search
- oktoberfest.pp.load_search(input_file)
Load search results.
Given a path to a file containing search results in Oktoberfest format, the function reads the results and returns them. The specification of the internal file format can be found at Custom search results.
- Parameters:
input_file (
Union[str,Path]) – Path to the file containing search results in the internal Oktoberfest format.- Return type:
- Returns:
dataframe containing the search results.
- Example:
>>> from oktoberfest import preprocessing as pp >>> search_results = pd.DataFrame({"MODIFIED_SEQUENCE": ["AAAC[UNIMOD:4]RFVQ","RM[UNIMOD:35]PC[UNIMOD:4]HKPYL","TAIASPEK"], >>> "SEQUENCE": ["AAACRFVQ","RMPCHKPYL","TAIASPEK"], >>> "PEPTIDE_LENGTH": [8,9,8], >>> "PRECURSOR_CHARGE": [1,2,7]}) >>> search_results.to_csv("./tests/doctests/input/search_results.csv",index=False) >>> library = pp.load_search("./tests/doctests/input/search_results.csv") >>> print(library)