1
1
import streamlit as st
2
2
import pandas as pd
3
3
import os
4
- import time
5
4
from datetime import datetime
6
5
7
6
from alphabase .yaml_utils import save_yaml
@@ -140,6 +139,16 @@ def _clear_user_mods():
140
139
141
140
142
141
def show ():
142
+ psm_type_to_ext_dict = {
143
+ "alphapept" : ".ms_data.hdf" ,
144
+ "pfind" : ".spectra" ,
145
+ "maxquant" : "msms.txt" ,
146
+ "diann" : "tsv" ,
147
+ "speclib_tsv" : "tsv" ,
148
+ "msfragger_pepxml" : "pepxml" ,
149
+ }
150
+ used_psm_types = list (psm_type_to_ext_dict .keys ())
151
+
143
152
st .write ("# Transfer learning" )
144
153
145
154
model_output_folder = st .text_input (
@@ -159,20 +168,13 @@ def show():
159
168
st_key = "select_psm_type" ,
160
169
default_type = global_ui_settings ["model_mgr" ]["transfer" ]["psm_type" ],
161
170
monitor_files = global_ui_settings ["model_mgr" ]["transfer" ]["psm_files" ],
162
- choices = global_ui_settings [ "model_mgr" ][ "transfer" ][ "psm_type_choices" ] ,
163
- index = global_ui_settings [ "model_mgr" ][ "transfer" ][ "psm_type_choices" ] .index (
171
+ choices = used_psm_types ,
172
+ index = used_psm_types .index (
164
173
global_ui_settings ["model_mgr" ]["transfer" ]["psm_type" ]
165
174
),
166
175
)
167
176
global_ui_settings ["model_mgr" ]["transfer" ]["psm_type" ] = psm_type
168
177
169
- psm_type_to_ext_dict = {
170
- "alphapept" : ".ms_data.hdf" ,
171
- "pfind" : ".spectra" ,
172
- "maxquant" : "msms.txt" ,
173
- "diann" : "tsv" ,
174
- "speclib_tsv" : "tsv" ,
175
- }
176
178
global_ui_settings ["model_mgr" ]["transfer" ]["psm_type" ] = psm_type
177
179
select_files (
178
180
global_ui_settings ["model_mgr" ]["transfer" ]["psm_files" ],
0 commit comments