Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#185 transfer GUI only supports best supported psm_readers #186

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions peptdeep/webui/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Starting the gui will raise by OpenMP in LLVM package
jalew188 marked this conversation as resolved.
Show resolved Hide resolved
# `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"
21 changes: 12 additions & 9 deletions peptdeep/webui/transfer_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from alphabase.yaml_utils import save_yaml
from alphabase.constants.modification import MOD_DF
import alphabase.psm_reader

from peptdeep.webui.server import queue_folder
from peptdeep.webui.ui_utils import (
Expand Down Expand Up @@ -140,6 +141,15 @@ 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",
jalew188 marked this conversation as resolved.
Show resolved Hide resolved
}
used_psm_types = list(psm_type_to_ext_dict.keys())
jalew188 marked this conversation as resolved.
Show resolved Hide resolved

st.write("# Transfer learning")

model_output_folder = st.text_input(
Expand All @@ -159,20 +169,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"],
Expand Down
Loading