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 all commits
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
24 changes: 8 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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]
Expand Down Expand Up @@ -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
1 change: 0 additions & 1 deletion peptdeep/_modidx.py

This file was deleted.

3 changes: 1 addition & 2 deletions peptdeep/constants/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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"
2 changes: 0 additions & 2 deletions peptdeep/webui/rescore_ui.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion peptdeep/webui/server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import time
import os
import sys
import shutil
import multiprocessing as mp

Expand Down
1 change: 0 additions & 1 deletion peptdeep/webui/server_ui.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import streamlit as st
import os
import psutil
import time

from alphabase.yaml_utils import load_yaml

Expand Down
3 changes: 1 addition & 2 deletions peptdeep/webui/settings_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
22 changes: 12 additions & 10 deletions peptdeep/webui/transfer_ui.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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",
jalew188 marked this conversation as resolved.
Show resolved Hide resolved
"msfragger_pepxml": "pepxml",
}
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 +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"],
Expand Down
Loading