176176 dbc .Col (
177177 html .H5 ("Data Selection" ),
178178 ),
179+ dbc .Col (
180+ dcc .Loading (
181+ id = "upload_status" ,
182+ children = [html .Div ([html .Div (id = "loading-output-3423" )])],
183+ type = "default" ,
184+ ),
185+ ),
179186 dbc .Col (
180187 dbc .Button ("Show/Hide" ,
181188 id = "data_selection_show_hide_button" ,
226233 multiple = True ,
227234 max_size = 150000000 # 150MB
228235 ),
229- dcc .Loading (
230- id = "upload_status" ,
231- children = [html .Div ([html .Div (id = "loading-output-3423" )])],
232- type = "default" ,
233- ),
234236 html .Hr (),
235237 # Linkouts
236238 dcc .Loading (
244246 children = [html .Div ([html .Div (id = "loading-output-232" )])],
245247 type = "default" ,
246248 ),
249+ dbc .InputGroup (
250+ [
251+ dbc .InputGroupAddon ("Comment" , addon_type = "prepend" ),
252+ dbc .Textarea (id = 'comment' , value = "" ),
253+ ],
254+ className = "mb-3" ,
255+ ),
256+ html .Hr (),
247257 html .H5 (children = 'LCMS Viewer Options' ),
248258 dbc .Row ([
249259 dbc .Col (
@@ -1629,7 +1639,13 @@ def draw_spectrum(usi, ms2_identifier, export_format, plot_theme, xic_mz):
16291639 Output ("feature_finding_min_peak_rt" , "value" ),
16301640 Output ("feature_finding_max_peak_rt" , "value" ),
16311641 Output ("feature_finding_rt_tolerance" , "value" ),
1632- Output ("sychronization_session_id" , "value" )
1642+ Output ("sychronization_session_id" , "value" ),
1643+
1644+ Output ("comment" , "value" ),
1645+
1646+ Output ("map_plot_color_scale" , "value" ),
1647+ Output ("map_plot_quantization_level" , "value" ),
1648+
16331649 ],
16341650 [
16351651 Input ('url' , 'search' ),
@@ -1674,6 +1690,12 @@ def draw_spectrum(usi, ms2_identifier, export_format, plot_theme, xic_mz):
16741690 State ('feature_finding_rt_tolerance' , 'value' ),
16751691
16761692 State ('sychronization_session_id' , 'value' ),
1693+
1694+ State ("comment" , 'value' ),
1695+
1696+ State ('map_plot_color_scale' , 'value' ),
1697+ State ('map_plot_quantization_level' , 'value' ),
1698+
16771699 ]
16781700 )
16791701def determine_url_only_parameters ( search ,
@@ -1719,7 +1741,12 @@ def determine_url_only_parameters( search,
17191741 existing_feature_finding_max_peak_rt ,
17201742 existing_feature_finding_rt_tolerance ,
17211743
1722- existing_sychronization_session_id ):
1744+ existing_sychronization_session_id ,
1745+
1746+ existing_comment ,
1747+
1748+ existing_map_plot_color_scale ,
1749+ existing_map_plot_quantization_level ):
17231750 triggered_id = [p ['prop_id' ] for p in dash .callback_context .triggered ][0 ]
17241751
17251752 print ("TRIGGERED URL PARSING" , triggered_id , file = sys .stderr )
@@ -1789,6 +1816,13 @@ def determine_url_only_parameters( search,
17891816 default_session_id = existing_sychronization_session_id
17901817 sychronization_session_id = _get_param_from_url (search , "" , "sychronization_session_id" , default_session_id , session_dict = session_dict , old_value = existing_sychronization_session_id , no_change_default = dash .no_update )
17911818
1819+ # Comment
1820+ comment = _get_param_from_url (search , "" , "comment" , dash .no_update , session_dict = session_dict , old_value = existing_comment , no_change_default = dash .no_update )
1821+
1822+ # Advanced Visualization Options
1823+ map_plot_color_scale = _get_param_from_url (search , "" , "map_plot_color_scale" , dash .no_update , session_dict = session_dict , old_value = existing_map_plot_color_scale , no_change_default = dash .no_update )
1824+ map_plot_quantization_level = _get_param_from_url (search , "" , "map_plot_quantization_level" , dash .no_update , session_dict = session_dict , old_value = existing_map_plot_quantization_level , no_change_default = dash .no_update )
1825+
17921826 # Formatting the types
17931827 try :
17941828 if xic_norm == "True" :
@@ -1836,7 +1870,10 @@ def determine_url_only_parameters( search,
18361870 polarity_filtering2 ,
18371871 overlay_usi , overlay_mz , overlay_rt , overlay_color , overlay_size , overlay_hover , overlay_filter_column , overlay_filter_value ,
18381872 feature_finding_type , feature_finding_ppm , feature_finding_noise , feature_finding_min_peak_rt , feature_finding_max_peak_rt , feature_finding_rt_tolerance ,
1839- sychronization_session_id ]
1873+ sychronization_session_id ,
1874+ comment ,
1875+ map_plot_color_scale ,
1876+ map_plot_quantization_level ]
18401877
18411878
18421879@app .callback ([
@@ -3042,7 +3079,12 @@ def create_gnps_mzmine2_link(usi, usi2, feature_finding_type, feature_finding_pp
30423079 Input ("feature_finding_rt_tolerance" , "value" ),
30433080 Input ("sychronization_save_session_button" , "n_clicks" ),
30443081 Input ("sychronization_session_id" , "value" ),
3045- Input ("synchronization_leader_token" , "value" )
3082+ Input ("synchronization_leader_token" , "value" ),
3083+
3084+ Input ("comment" , "value" ),
3085+
3086+ Input ("map_plot_color_scale" , "value" ),
3087+ Input ("map_plot_quantization_level" , "value" ),
30463088 ],
30473089 [
30483090 State ('synchronization_type' , 'value' )
@@ -3052,7 +3094,10 @@ def create_link(usi, usi2, xic_mz, xic_formula, xic_peptide,
30523094 xic_integration_type , show_ms2_markers , ms2_identifier , map_plot_zoom , polarity_filtering , polarity_filtering2 , show_lcms_2nd_map , tic_option ,
30533095 overlay_usi , overlay_mz , overlay_rt , overlay_color , overlay_size , overlay_hover , overlay_filter_column , overlay_filter_value ,
30543096 feature_finding_type , feature_finding_ppm , feature_finding_noise , feature_finding_min_peak_rt , feature_finding_max_peak_rt , feature_finding_rt_tolerance ,
3055- sychronization_save_session_button_clicks , sychronization_session_id , synchronization_leader_token , synchronization_type ):
3097+ sychronization_save_session_button_clicks , sychronization_session_id , synchronization_leader_token ,
3098+ comment ,
3099+ map_plot_color_scale , map_plot_quantization_level ,
3100+ synchronization_type ):
30563101
30573102 url_params = {}
30583103 url_params ["xic_mz" ] = xic_mz
@@ -3094,6 +3139,13 @@ def create_link(usi, usi2, xic_mz, xic_formula, xic_peptide,
30943139 # Sychronization Options
30953140 url_params ["sychronization_session_id" ] = sychronization_session_id
30963141
3142+ # Comment
3143+ url_params ["comment" ] = comment
3144+
3145+ # Advanced Viz options
3146+ url_params ["map_plot_color_scale" ] = map_plot_color_scale
3147+ url_params ["map_plot_quantization_level" ] = map_plot_quantization_level
3148+
30973149 hash_params = {}
30983150 hash_params ["usi" ] = usi
30993151 hash_params ["usi2" ] = usi2
@@ -3358,10 +3410,12 @@ def create_sychronization_link(sychronization_session_id, synchronization_leader
33583410
33593411
33603412@app .callback (Output ('network-link-button' , 'children' ),
3361- [Input ('usi' , 'value' ),
3362- Input ('usi2' , 'value' ),
3413+ [
3414+ Input ('usi' , 'value' ),
3415+ Input ('usi2' , 'value' ),
33633416 ])
33643417def create_networking_link (usi , usi2 ):
3418+
33653419 full_url = "https://gnps.ucsd.edu/ProteoSAFe/index.jsp?params="
33663420
33673421 g1_list = []
0 commit comments