Skip to content

Commit

Permalink
Merge branch 'main' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgWa committed Jan 5, 2025
2 parents 9973121 + 485717b commit c4694e6
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 27 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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') }}
3 changes: 2 additions & 1 deletion .github/workflows/branch-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pip_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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 ]
Expand Down
2 changes: 1 addition & 1 deletion alphadia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!python

__version__ = "1.9.1"
__version__ = "1.9.2"
4 changes: 2 additions & 2 deletions alphadia/outputaccumulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion alphadia/transferlearning/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
@@ -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": "./",
Expand Down
2 changes: 1 addition & 1 deletion gui/src/main/modules/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion misc/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.9.1
current_version = 1.9.2
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
7 changes: 6 additions & 1 deletion misc/pip_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion release/linux/build_installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion release/linux/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: alphadia
Version: 1.9.1
Version: 1.9.2
Architecture: all
Maintainer: Mann Labs <[email protected]>
Description: alphadia
Expand Down
2 changes: 1 addition & 1 deletion release/macos/build_installer_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions release/macos/build_package_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion release/macos/distribution.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-script minSpecVersion="1.000000">
<title>AlphaDIA 1.9.1</title>
<title>AlphaDIA 1.9.2</title>
<background mime-type="image/png" file="alphadia.png" scaling="proportional"/>
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
Expand Down
4 changes: 2 additions & 2 deletions release/macos/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleIconFile</key>
<string>alphadia.icns</string>
<key>CFBundleIdentifier</key>
<string>alphadia.1.9.1</string>
<string>alphadia.1.9.2</string>
<key>CFBundleShortVersionString</key>
<string>1.9.1</string>
<string>1.9.2</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions release/windows/alphadia_innoinstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion release/windows/build_installer_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions requirements/requirements_loose.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4694e6

Please sign in to comment.