diff --git a/.github/workflows/build-windows-executable-app.yaml b/.github/workflows/build-windows-executable-app.yaml index feb31e08..4f6494d6 100644 --- a/.github/workflows/build-windows-executable-app.yaml +++ b/.github/workflows/build-windows-executable-app.yaml @@ -14,7 +14,7 @@ env: OPENMS_VERSION: 3.2.0 PYTHON_VERSION: 3.11.0 # Name of the installer - APP_NAME: FLASHApp-0.8.4 + APP_NAME: FLASHApp-0.9.0 APP_UpgradeCode: "69ae44ad-d554-4e3c-8715-7c4daf60f8bb" jobs: diff --git a/Dockerfile b/Dockerfile index 5f5caebc..362d4592 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,7 +80,7 @@ SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"] # Install up-to-date cmake via mamba and packages for pyOpenMS build. RUN mamba install cmake -RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython<3.1' autowrap pandas 'numpy==1.26.4' pytest +RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython<3.1' 'autowrap<0.23' pandas 'numpy==1.26.4' pytest # Clone OpenMS branch and the associcated contrib+thirdparties+pyOpenMS-doc submodules. RUN git clone --recursive --depth=1 -b ${OPENMS_BRANCH} --single-branch ${OPENMS_REPO} && cd /OpenMS diff --git a/content/quickstart.py b/content/quickstart.py index 2e3de961..267eed2c 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -5,47 +5,478 @@ page_setup(page="main") -st.markdown("# ๐Ÿ‘‹ Quick Start") -st.markdown("## FLASHApp") - - -# main content -st.markdown('#### FLASHApp: A Platform for Your Favorite FLASH\* Tools!') - -st.info(""" - **๐Ÿ’ก How to run FLASHApp** - 1. Go to the **โš™๏ธ Workflow** page through the sidebar and run your analysis.\ - OR, go to the **๐Ÿ“ File Upload** page through the sidebar and upload FLASHDeconv output files (\*_annotated.mzML & \*_deconv.mzML) - 2. Click the **๐Ÿ‘€ Viewer** page on the sidebar to view the results in detail. - """) - -if Path("OpenMS-App.zip").exists(): - st.subheader( +def inject_workflow_button_css(): + """Inject CSS for custom workflow button styling with responsive design.""" + st.markdown( """ -Download the latest version for Windows here by clicking the button below. -""" + + """, + unsafe_allow_html=True, ) - with open("OpenMS-App.zip", "rb") as file: - st.download_button( - label="Download for Windows", - data=file, - file_name="OpenMS-App.zip", - mime="archive/zip", - type="primary", - ) + +def create_navigation_button(emoji, title, subtitle, page_path): + """Create a functional workflow button that navigates to the specified page.""" + + # Create unique key for this button + button_key = f"{title.lower().replace(' ', '_')}_nav_btn" + + # Create the button with custom styling applied via CSS classes + button_label = f"{emoji} {title}" + + # Use Streamlit's button with custom styling + if st.button( + label=button_label, + key=button_key, + help=f"Navigate to {title} - {subtitle}", + use_container_width=True, + type="primary" + ): + st.switch_page(page_path) + + # Apply custom CSS styling using the key-based selector approach + st.markdown( + f""" + + """, + unsafe_allow_html=True, + ) + +def render_workflow_selection(): + """Render the main workflow selection section.""" + # Hero section with title on left and OpenMS logo on right st.markdown( """ -Extract the zip file and run the installer (.msi) file to install the app. The app can then be launched using the corresponding desktop icon. -""" +
+ """, + unsafe_allow_html=True, ) + + # Create columns for title and logo + spacer1, title_col, logo_col, spacer2 = st.columns([1, 4.5, 1.5, 1]) + + with title_col: + st.markdown( + """ +

๐Ÿ‘‹ FLASHApp

+

A platform for your favourite FLASH Tools!

+ """, + unsafe_allow_html=True, + ) + + with logo_col: + st.image("assets/OpenMS.png", width=200) + + st.markdown("
", unsafe_allow_html=True) + + # Main workflow selection buttons with centered, compact layout + # Use spacing columns to center buttons and prevent wide-screen spreading + spacer1, col1, col2, col3, spacer2 = st.columns([1, 2, 2, 2, 1], gap="small") + + with col1: + create_navigation_button( + "โšก๏ธ", + "Deconvolution", + "FLASHDeconv", + "content/FLASHDeconv/FLASHDeconvWorkflow.py" + ) + + with col2: + create_navigation_button( + "๐Ÿงจ", + "Identification", + "FLASHTnT", + "content/FLASHTnT/FLASHTnTWorkflow.py" + ) + + with col3: + create_navigation_button( + "๐Ÿ“Š", + "Quantification", + "FLASHQuant", + "content/FLASHQuant/FLASHQuantFileUpload.py" + ) + +def render_enhanced_download_section(): + if Path("OpenMS-App.zip").exists(): + # Add spacing + st.markdown("


", unsafe_allow_html=True) + + # Create Streamlit container with key for styling (similar to button approach) + container_key = "windows_download_container" + + with st.container(key=container_key): + st.markdown( + """ +

+ Want to use FLASHApp offline? +

+

+ FLASHApp is best enjoyed online but you can download an offline version for Windows systems below. +

+ """, + unsafe_allow_html=True, + ) + + # Center the Windows download button + col1, col2, col3 = st.columns([2, 2, 2]) + with col2: + with open("OpenMS-App.zip", "rb") as file: + st.download_button( + label="๐Ÿ“ฅ Download for Windows", + data=file, + file_name="OpenMS-App.zip", + mime="archive/zip", + type="secondary", + use_container_width=True, + help="Download FLASHApp for Windows systems" + ) + + st.markdown( + """ +
+ Extract the zip file and run the installer (.msi) to install the app.
+ Launch using the desktop icon after installation. +
+ """, + unsafe_allow_html=True, + ) + + # Apply container styling using key-based CSS targeting (similar to button styling approach) + st.markdown( + f""" + + """, + unsafe_allow_html=True, + ) + +# Main execution +def main(): + """Main function to render the quickstart page.""" + # Inject custom CSS + inject_workflow_button_css() + + # Render main sections + render_workflow_selection() + + + render_enhanced_download_section() + -c1, c2 = st.columns(2) -c1.markdown( - """ -## โญ New - -- FLASHViewer is now FLASHApp -- Want to save your progress or share it with your team? Simply bookmark / share the URL! -""" -) -c2.image("assets/OpenMS.png", width=300) +main() diff --git a/settings.json b/settings.json index 58bbb506..6d2f884e 100644 --- a/settings.json +++ b/settings.json @@ -1,7 +1,7 @@ { "app-name": "FLASHApp", "github-user": "OpenMS", - "version": "0.8.4", + "version": "0.9.0", "repository-name": "FLASHApp", "analytics": { "google-analytics": { diff --git a/src/render/sequence.py b/src/render/sequence.py index 48b83bc5..5cb0b4e2 100644 --- a/src/render/sequence.py +++ b/src/render/sequence.py @@ -166,7 +166,8 @@ def getFragmentDataFromSeq(sequence, coverage=None, maxCoverage=None, modificati 'W': 186.079313, 'Y': 163.063329, 'V': 99.068414, - 'X' : 0 + 'X' : 0, + 'Z' : 0, # Glx does not have defined mass } def isMatchWithTolerance(A, t, s): diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index a8f7cf51..bb76e9d3 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -749,6 +749,7 @@ def display_TOPP_params(params: dict, num_cols): value=float(p["value"]), step=1.0, help=p["description"], + format="%0.5f", key=key, )