diff --git a/.github/workflows/_run_tests.yml b/.github/workflows/_run_tests.yml index 92436ac9..1cc32945 100644 --- a/.github/workflows/_run_tests.yml +++ b/.github/workflows/_run_tests.yml @@ -1,5 +1,5 @@ # reusable workflow to run tests on different installation types and OS -name: run-tests +name: Run unit tests on: workflow_call: @@ -17,7 +17,8 @@ on: required: true type: string jobs: - run-unit-tests-stable-ubuntu: + run-unit-tests: + name: Unit tests [${{ inputs.os }}] runs-on: ${{ inputs.os }} steps: - uses: actions/checkout@v4 @@ -35,17 +36,17 @@ jobs: shell: bash -l {0} run: conda info - name: Install mono + if: ${{ !contains(inputs.os, 'windows') }} shell: bash -l {0} run: | conda install mono - - name: Perform pip installation with all stable dependencies shell: bash -l {0} run: | cd misc - . ./${{ inputs.install-script }} alphadia ${{ inputs.python-version }} + . ./${{ inputs.install-script }} alphadia ${{ inputs.python-version }} ${{ !contains(inputs.os, 'windows') }} - name: Run tests shell: bash -l {0} run: | cd tests - . ./${{ inputs.test-script }} alphadia ${{ inputs.python-version }} + . ./${{ inputs.test-script }} alphadia ${{ inputs.python-version }} ${{ !contains(inputs.os, 'windows') }} diff --git a/.github/workflows/branch-checks.yaml b/.github/workflows/branch-checks.yaml index 5fa58954..90677094 100644 --- a/.github/workflows/branch-checks.yaml +++ b/.github/workflows/branch-checks.yaml @@ -15,8 +15,9 @@ jobs: # For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources. run-tests-stable: - name: Test stable pip installation on ubuntu-latest + name: Test 'stable' on ubuntu-latest strategy: + fail-fast: false matrix: os: [ubuntu-latest] python-version: ["3.10", "3.11", "3.12"] diff --git a/.github/workflows/pip_installation.yml b/.github/workflows/pip_installation.yml index 172f3b5a..92e6721b 100644 --- a/.github/workflows/pip_installation.yml +++ b/.github/workflows/pip_installation.yml @@ -21,7 +21,7 @@ concurrency: jobs: run-unit-tests-stable: - name: Test stable pip installation on 3 OS + name: Test 'stable' on ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-13, windows-latest] @@ -34,7 +34,7 @@ jobs: test-script: ./run_unit_tests.sh run-unit-tests-loose: - name: Test loose pip installation on 3 OS + name: Test 'loose' on ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-13, windows-latest ] diff --git a/alphadia/__init__.py b/alphadia/__init__.py index bd2ea95b..e16450ce 100644 --- a/alphadia/__init__.py +++ b/alphadia/__init__.py @@ -1,3 +1,3 @@ #!python -__version__ = "1.9.1" +__version__ = "1.9.2" diff --git a/alphadia/outputaccumulator.py b/alphadia/outputaccumulator.py index 9f1e8547..76c14cd2 100644 --- a/alphadia/outputaccumulator.py +++ b/alphadia/outputaccumulator.py @@ -585,8 +585,8 @@ def ms2_quality_control( # use the precursor for MS2 learning if the median correlation is above the cutoff use_for_ms2[i] = median_correlation > precursor_correlation_cutoff - # Fix: Use loc to modify the original DataFrame instead of the view - spec_lib_base.fragment_intensity_df.loc[start_idx:stop_idx] = ( + # Fix: Use iloc to modify the original DataFrame instead of the view + spec_lib_base.fragment_intensity_df.iloc[start_idx:stop_idx] = ( fragment_intensity_view.values * ( fragment_correlation_view diff --git a/alphadia/transferlearning/train.py b/alphadia/transferlearning/train.py index 9704d557..b26e7899 100644 --- a/alphadia/transferlearning/train.py +++ b/alphadia/transferlearning/train.py @@ -5,6 +5,7 @@ import torch from alphabase.peptide.fragment import remove_unused_fragments from alphabase.peptide.mobility import ccs_to_mobility_for_df, mobility_to_ccs_for_df +from alphabase.peptide.precursor import refine_precursor_df from peptdeep.model.charge import ChargeModelForModAASeq from peptdeep.model.model_interface import CallbackHandler, LR_SchedulerInterface from peptdeep.pretrained_models import ModelManager @@ -564,13 +565,14 @@ def finetune_ms2( test_intensity_df = test_intensity_df[0] # Prepare order for peptdeep prediction - + val_psm_df = refine_precursor_df(val_psm_df) reordered_val_psm_df = self._reset_frag_idx(val_psm_df) reordered_val_intensity_df = self._order_intensities( reordered_precursor_df=reordered_val_psm_df, unordered_precursor_df=val_psm_df, unordered_frag_df=val_intensity_df, ) + test_psm_df = refine_precursor_df(test_psm_df) reordered_test_psm_df = self._reset_frag_idx(test_psm_df) reordered_test_intensity_df = self._order_intensities( reordered_precursor_df=reordered_test_psm_df, diff --git a/gui/package.json b/gui/package.json index def7516f..0c003da7 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,7 +1,7 @@ { "name": "alphadia", "productName": "alphadia-gui", - "version": "1.9.1", + "version": "1.9.2", "description": "Graphical user interface for DIA data analysis", "main": "dist/electron.js", "homepage": "./", diff --git a/gui/src/main/modules/profile.js b/gui/src/main/modules/profile.js index 9f831dec..c9b7f95b 100644 --- a/gui/src/main/modules/profile.js +++ b/gui/src/main/modules/profile.js @@ -3,7 +3,7 @@ const path = require("path") const { app, shell, BrowserWindow} = require("electron") const { dialog } = require('electron') -const VERSION = "1.9.1" +const VERSION = "1.9.2" const Profile = class { diff --git a/misc/.bumpversion.cfg b/misc/.bumpversion.cfg index 97037493..1aa88e0f 100644 --- a/misc/.bumpversion.cfg +++ b/misc/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.9.1 +current_version = 1.9.2 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? diff --git a/misc/pip_install.sh b/misc/pip_install.sh index 2ca0b8b8..b48ee03e 100644 --- a/misc/pip_install.sh +++ b/misc/pip_install.sh @@ -3,8 +3,13 @@ set -e -u INSTALL_TYPE=$1 # stable, loose, etc.. ENV_NAME=${2:-alphadia} PYTHON_VERSION=${3:-3.11} +INSTALL_MONO=${4:-false} -conda create -n $ENV_NAME python=$PYTHON_VERSION mono -y +if [ "$INSTALL_MONO" = "true" ]; then + conda create -n $ENV_NAME python=$PYTHON_VERSION mono -y +else + conda create -n $ENV_NAME python=$PYTHON_VERSION -y +fi if [ "$INSTALL_TYPE" = "loose" ]; then INSTALL_STRING="" diff --git a/release/linux/build_installer_linux.sh b/release/linux/build_installer_linux.sh index cfcbb9bb..35703bad 100755 --- a/release/linux/build_installer_linux.sh +++ b/release/linux/build_installer_linux.sh @@ -10,7 +10,7 @@ rm -rf dist build *.egg-info rm -rf dist_pyinstaller build_pyinstaller python -m build -pip install "dist/alphadia-1.9.1-py3-none-any.whl[stable]" +pip install "dist/alphadia-1.9.2-py3-none-any.whl[stable]" if [ "${CPU_OR_GPU}" != "GPU" ]; then pip install torch -U --extra-index-url https://download.pytorch.org/whl/cpu diff --git a/release/linux/control b/release/linux/control index 1568815e..90fed30a 100644 --- a/release/linux/control +++ b/release/linux/control @@ -1,5 +1,5 @@ Package: alphadia -Version: 1.9.1 +Version: 1.9.2 Architecture: all Maintainer: Mann Labs Description: alphadia diff --git a/release/macos/build_installer_macos.sh b/release/macos/build_installer_macos.sh index 7df4cf99..0fd02708 100755 --- a/release/macos/build_installer_macos.sh +++ b/release/macos/build_installer_macos.sh @@ -10,7 +10,7 @@ rm -rf dist_pyinstaller build_pyinstaller export EAGER_IMPORT=true # TODO check if this can be removed with newset peptdeep version w/out transformer dependenc python -m build -pip install "dist/alphadia-1.9.1-py3-none-any.whl[stable]" +pip install "dist/alphadia-1.9.2-py3-none-any.whl[stable]" # Creating the stand-alone pyinstaller folder pyinstaller release/pyinstaller/alphadia.spec --distpath dist_pyinstaller --workpath build_pyinstaller -y diff --git a/release/macos/build_package_macos.sh b/release/macos/build_package_macos.sh index 6838c237..2ae26c65 100755 --- a/release/macos/build_package_macos.sh +++ b/release/macos/build_package_macos.sh @@ -7,10 +7,10 @@ set -e -u # Set up package name and version PACKAGE_NAME="alphadia" APP_NAME="alphadia" -PACKAGE_VERSION="1.9.1" +PACKAGE_VERSION="1.9.2" PKG_FOLDER="dist/$APP_NAME.app" -# BUILD_NAME is taken from environment variables, e.g. alphadia-1.9.1-macos-darwin-arm64 or alphadia-1.9.1-macos-darwin-x64 +# BUILD_NAME is taken from environment variables, e.g. alphadia-1.9.2-macos-darwin-arm64 or alphadia-1.9.2-macos-darwin-x64 rm -rf ${BUILD_NAME}.pkg # Cleanup the package folder diff --git a/release/macos/distribution.xml b/release/macos/distribution.xml index d5d7dea8..bac68251 100644 --- a/release/macos/distribution.xml +++ b/release/macos/distribution.xml @@ -1,6 +1,6 @@ - AlphaDIA 1.9.1 + AlphaDIA 1.9.2 diff --git a/release/macos/info.plist b/release/macos/info.plist index 3809c893..02a16ba3 100644 --- a/release/macos/info.plist +++ b/release/macos/info.plist @@ -9,9 +9,9 @@ CFBundleIconFile alphadia.icns CFBundleIdentifier - alphadia.1.9.1 + alphadia.1.9.2 CFBundleShortVersionString - 1.9.1 + 1.9.2 CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/release/windows/alphadia_innoinstaller.iss b/release/windows/alphadia_innoinstaller.iss index 4f332647..a19ba8e4 100644 --- a/release/windows/alphadia_innoinstaller.iss +++ b/release/windows/alphadia_innoinstaller.iss @@ -5,7 +5,7 @@ ; so all paths are given relative to the location of this .iss file. #define MyAppName "AlphaDIA" -#define MyAppVersion "1.9.1" +#define MyAppVersion "1.9.2" #define MyAppPublisher "Max Planck Institute of Biochemistry, Mann Labs" #define MyAppURL "https://github.com/MannLabs/alphadia" #define MyAppExeName "alphadia-gui.exe" @@ -29,7 +29,7 @@ PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog ; release workflow expects artifact at root of repository OutputDir=..\..\ -; example for BUILD_NAME: alphadia-1.9.1-win-x64 +; example for BUILD_NAME: alphadia-1.9.2-win-x64 OutputBaseFilename={#GetEnv('BUILD_NAME')} SetupIconFile=..\logos\alphadia.ico Compression=lzma diff --git a/release/windows/build_installer_windows.ps1 b/release/windows/build_installer_windows.ps1 index 974e2682..1123d75f 100644 --- a/release/windows/build_installer_windows.ps1 +++ b/release/windows/build_installer_windows.ps1 @@ -5,7 +5,7 @@ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./build Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./dist python -m build -pip install "dist/alphadia-1.9.1-py3-none-any.whl[stable]" +pip install "dist/alphadia-1.9.2-py3-none-any.whl[stable]" # Creating the stand-alone pyinstaller folder pip install tbb==2021.13.1 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index c421c4e8..6a165d05 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -17,6 +17,7 @@ transformers==4.40.2 directlfq==0.2.19 pythonnet==3.0.3 zstandard==0.22.0 +dask==2024.11.2 # not direct dependencies but we have to restrict the versions numpy<2 # test: tolerate_version avoid the breaking change in numpy >= 2 scipy==1.12.0 diff --git a/requirements/requirements_loose.txt b/requirements/requirements_loose.txt index 68aa94bf..d373a565 100644 --- a/requirements/requirements_loose.txt +++ b/requirements/requirements_loose.txt @@ -6,6 +6,7 @@ alpharaw>=0.3.1 # test: tolerate_version alphatims alphabase>=1.4.0 # test: tolerate_version peptdeep>=1.3.0 # test: tolerate_version +dask==2024.11.2 # test: tolerate_version progressbar neptune seaborn