diff --git a/.gitignore b/.gitignore index 2e47ccb6..ffd5c3e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# User defined: +peptdeep/logs +*.DS_Store +*sandbox* +*installed_models* +*.last_checked* +*mono_crash.*.blob + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -128,19 +136,3 @@ dmypy.json # Pyre type checker .pyre/ - -# User defined: -peptdeep/logs -*.DS_Store -*sandbox* -*installed_models* -*.last_checked* - -# nbdev2 -*.gitattributes -_docs* -# *_quarto.yml -# *sidebar.yml -*_proc* -# .gitconfig is now autogenerated -.gitconfig diff --git a/peptdeep/_modidx.py b/peptdeep/_modidx.py deleted file mode 100644 index 53ce3258..00000000 --- a/peptdeep/_modidx.py +++ /dev/null @@ -1 +0,0 @@ -d = {"settings": {}, "syms": {}} diff --git a/peptdeep/constants/default_settings.yaml b/peptdeep/constants/default_settings.yaml index d01acbc2..855d993f 100644 --- a/peptdeep/constants/default_settings.yaml +++ b/peptdeep/constants/default_settings.yaml @@ -265,10 +265,9 @@ library: max_precursor_mz: 2000.0 decoy: None decoy_choices: - - protein_reverse + - None - pseudo_reverse - diann - - None max_frag_charge: 2 frag_types: - b diff --git a/peptdeep/webui/__init__.py b/peptdeep/webui/__init__.py index e69de29b..ec70a708 100644 --- a/peptdeep/webui/__init__.py +++ b/peptdeep/webui/__init__.py @@ -0,0 +1,6 @@ +# Starting the gui will raise by OpenMP in LLVM package +# `OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.` +# This is a quick fix, and it will only affect the GUI rather than the kernel. +import os + +os.environ["KMP_DUPLICATE_LIB_OK"] = "True" diff --git a/peptdeep/webui/rescore_ui.py b/peptdeep/webui/rescore_ui.py index f586d885..d2122e40 100644 --- a/peptdeep/webui/rescore_ui.py +++ b/peptdeep/webui/rescore_ui.py @@ -1,7 +1,5 @@ import streamlit as st -import pandas as pd import os -import time from .ui_utils import files_in_folder_pandas from peptdeep.settings import global_settings diff --git a/peptdeep/webui/server.py b/peptdeep/webui/server.py index fae9d42b..601aa8cb 100644 --- a/peptdeep/webui/server.py +++ b/peptdeep/webui/server.py @@ -1,6 +1,5 @@ import time import os -import sys import shutil import multiprocessing as mp diff --git a/peptdeep/webui/server_ui.py b/peptdeep/webui/server_ui.py index d27d79e3..5d36c9f2 100644 --- a/peptdeep/webui/server_ui.py +++ b/peptdeep/webui/server_ui.py @@ -1,7 +1,6 @@ import streamlit as st import os import psutil -import time from alphabase.yaml_utils import load_yaml diff --git a/peptdeep/webui/settings_ui.py b/peptdeep/webui/settings_ui.py index a2069ee3..7c1d0925 100644 --- a/peptdeep/webui/settings_ui.py +++ b/peptdeep/webui/settings_ui.py @@ -9,10 +9,9 @@ from peptdeep.settings import ( update_settings, add_user_defined_modifications, + global_settings, ) -from peptdeep.settings import global_settings - global_ui_settings = global_settings diff --git a/peptdeep/webui/transfer_ui.py b/peptdeep/webui/transfer_ui.py index 8541671d..30e73db3 100644 --- a/peptdeep/webui/transfer_ui.py +++ b/peptdeep/webui/transfer_ui.py @@ -1,7 +1,6 @@ import streamlit as st import pandas as pd import os -import time from datetime import datetime from alphabase.yaml_utils import save_yaml @@ -140,6 +139,16 @@ def _clear_user_mods(): def show(): + psm_type_to_ext_dict = { + "alphapept": ".ms_data.hdf", + "pfind": ".spectra", + "maxquant": "msms.txt", + "diann": "tsv", + "speclib_tsv": "tsv", + "msfragger_pepxml": "pepxml", + } + used_psm_types = list(psm_type_to_ext_dict.keys()) + st.write("# Transfer learning") model_output_folder = st.text_input( @@ -159,20 +168,13 @@ def show(): st_key="select_psm_type", default_type=global_ui_settings["model_mgr"]["transfer"]["psm_type"], monitor_files=global_ui_settings["model_mgr"]["transfer"]["psm_files"], - choices=global_ui_settings["model_mgr"]["transfer"]["psm_type_choices"], - index=global_ui_settings["model_mgr"]["transfer"]["psm_type_choices"].index( + choices=used_psm_types, + index=used_psm_types.index( global_ui_settings["model_mgr"]["transfer"]["psm_type"] ), ) global_ui_settings["model_mgr"]["transfer"]["psm_type"] = psm_type - psm_type_to_ext_dict = { - "alphapept": ".ms_data.hdf", - "pfind": ".spectra", - "maxquant": "msms.txt", - "diann": "tsv", - "speclib_tsv": "tsv", - } global_ui_settings["model_mgr"]["transfer"]["psm_type"] = psm_type select_files( global_ui_settings["model_mgr"]["transfer"]["psm_files"],