Skip to content

Commit

Permalink
Support for version 1.9.2 (#33)
Browse files Browse the repository at this point in the history
* diann version updated to support 1.9.2

* increase version

* increase version

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* remove dependency setuptools

* 3.8 -> 3.9

* 3.8 -> 3.9

* 3.8 -> 3.9

* 3.8 -> 3.9

* 3.8 -> 3.9

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* removing duplicated dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* Update conda-build.yml

* Create conda_build_config.yml

* Update meta.yaml

* clean dependencies

* clean dependencies

* clean dependencies

* Cleanup conda-build.yml and debug

* Try mamba build

* Use Conda build

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* clean dependencies

* adding pydantic

* adding psm-utils

* adding psm-utils

* adding set pydantic version

* remove pydantic

* psm_utils 1.0.0

* psm_utils 1.0.0

* psm_utils 1.0.0

* psm_utils 1.0.0

* psm_utils 1.0.0

* psm_utils 1.0.0

* Rename conda_build_config.yml to conda_build_config.yaml

* Update conda-build.yml

* cleanup. again

* added version ms2pip=4.0.0.dev8

* added version ms2pip=4.0.0.dev8

* added version ms2pip=4.0.0.dev8

* adding deeplc version

* adding deeplc version

* remove some versions

* remove some versions

* remove some versions

* remove some versions

* remove some versions

* psm-utils==0.8.3

* major changes

---------

Co-authored-by: Julianus Pfeuffer <[email protected]>
  • Loading branch information
ypriverol and jpfeuffer authored Nov 20, 2024
1 parent e8987c6 commit 0046084
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 202 deletions.
60 changes: 22 additions & 38 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,38 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4 # Update to latest version

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.8
channels: conda-forge,defaults,bioconda

- name: Create conda environment
run: conda env create -f environment.yml

- name: Install mamba, boa and conda-build
mamba-version: "*"
channels: conda-forge,bioconda
cache-downloads: true
auto-update-conda: false
activate-environment: test
python-version: 3.11

- name: Setup conda-build and anaconda-client
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate quantmsutils
conda install conda-forge::mamba
conda install conda-forge::boa
mamba install conda-build anaconda-client
shell: bash -l {0}
mamba install -q conda-build anaconda-client conda-verify
- name: Activate conda environment and build package
- name: Build package
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate quantmsutils
conda mambabuild recipe
shell: bash -l {0}
conda build purge-all
conda config --set solver libmamba
conda config --set channel_priority strict
conda build recipe --suppress-variables --override-channels --channel conda-forge --channel bioconda --no-anaconda-upload
- name: Install the built package
- name: Install the built package and test
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate quantmsutils
mamba install --use-local quantms-utils
shell: bash -l {0}

- name: Output package info
run: |
source $CONDA/etc/profile.d/conda.sh
mamba create --name quantmsutils quantms-utils --use-local
conda activate quantmsutils
conda list
shell: bash -l {0}

- name: Test the installed package
run: |
conda activate quantmsutils
quantmsutilsc --help
quantmsutilsc --version
shell: bash -l {0}
quantmsutilsc --version
8 changes: 5 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py install
pip install poetry
poetry build
pip install dist/*.whl
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -37,7 +39,7 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
poetry run pytest
- name: Download test data
run: |
wget https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/quantms-ci-github/quantms-utils/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzML
Expand Down
15 changes: 2 additions & 13 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ name: quantmsutils
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- click
- sdrf-pipelines>=0.0.31
- pyopenms
- ms2rescore=3.0.3
- deeplc=2.2.38
- ms2pip=4.0.0.dev8
- psm-utils=0.8.2
- deeplcretrainer
- pydantic=1.10.14
- pandas
- protobuf>=3.9.2,<4 # Ensure compatibility with tensorboard
- numpy
- pyarrow
- pygam
- scipy==1.13.1
- scikit-learn
- setuptools
- pip
- pip:
- tensorboard
- psm-utils=0.8.3
75 changes: 47 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,60 @@
[tool.poetry]
name = "quantms-utils"
version = "0.0.10"
description = "Python scripts and helpers for the quantMS workflow"
authors = ["Yasset Perez-Riverol", "Dai Chengxin"]
readme = "README.md"
license = "MIT"
version = "0.0.13"
authors = [
"Yasset Perez-Riverol <[email protected]>",
"Dai Chengxin <[email protected]>",
"Julianus Pfeuffer <[email protected]>"
]
keywords = [
"quantms",
"proteomics",
"mass-spectrometry",
"data-analysis",
"big data"
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Development Status :: 5 - Production/Stable"
]
packages = [
{ include = "quantmsutils" }
]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.poetry.dependencies]
click = ">=7.0"
pydantic = ">=1.10,<2"
python = "^3.7"
sdrf-pipelines = ">=0.0.29"
pyopenms = ">=2.6.0"
pandas = ">=1.0.0"
ms2rescore = "==3.0.3"
deeplc = "==2.2.38"
ms2pip = "==4.0.0.dev8"
psm-utils = "==0.8.2"
protobuf = ">=3.9.2,<4"
scipy = "==1.13.1"
python = ">=3.8,<3.12"
click = "*"
sdrf-pipelines = ">=0.0.31"
pyopenms = "*"
ms2rescore = "3.0.3"
pandas = "*"
numpy = "*"
pyarrow = "*"
psm-utils = "0.8.3"

[tool.poetry.dev-dependencies]
pytest = "*"
[tool.poetry.urls]
GitHub = "https://github.com/bigbio/quantms-utils"
PyPi = "https://pypi.org/project/quantms-utils/"
Quantms = "https://quantms.org"
LICENSE = "https://github.com/bigbio/quantms-utils/blob/main/LICENSE"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = ["tests"]
[tool.poetry.scripts]
quantmsutilsc = "quantmsutils.quantmsutilsc:main"

[tool.isort]
profile = "black"

[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
line-length = 99
target-version = ["py39"]

[tool.poetry.scripts]
quantmsutilsc = "quantmsutils.quantmsutilsc:main"
[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion quantmsutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.12"
__version__ = "0.0.13"
8 changes: 4 additions & 4 deletions quantmsutils/diann/diann2mztab.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def diann_version(self) -> str:
return diann_version_id

def validate_diann_version(self) -> None:
supported_diann_versions = ["1.8.1", "1.9.beta.1"]
supported_diann_versions = ["1.8.1", "1.9.beta.1", "1.9.2"]
if self.diann_version not in supported_diann_versions:
raise ValueError(f"Unsupported DIANN version {self.diann_version}")

Expand Down Expand Up @@ -411,7 +411,7 @@ def convert_to_mztab(
)

mtd, database = mztab_mtd(
index_ref, dia_params, str(self.fasta), charge, missed_cleavages
index_ref, dia_params, str(self.fasta), charge, missed_cleavages, self.diann_version
)
pg = pd.read_csv(
self.pg_matrix,
Expand Down Expand Up @@ -545,7 +545,7 @@ def mtd_mod_info(fix_mod, var_mod):
return fix_ptm, var_ptm, fix_flag, var_flag


def mztab_mtd(index_ref, dia_params, fasta, charge, missed_cleavages):
def mztab_mtd(index_ref, dia_params, fasta, charge, missed_cleavages, diann_version):
"""
Construct MTD sub-table.
Expand Down Expand Up @@ -587,7 +587,7 @@ def mztab_mtd(index_ref, dia_params, fasta, charge, missed_cleavages):
out_mztab_mtd.loc[1, "psm_search_engine_score[1]"] = (
"[MS, MS:MS:1001869, protein-level q-value, ]"
)
out_mztab_mtd.loc[1, "software[1]"] = "[MS, MS:1003253, DIA-NN, Release (v1.8.1)]"
out_mztab_mtd.loc[1, "software[1]"] = "[MS, MS:1003253, DIA-NN, {}]".format(diann_version)
out_mztab_mtd.loc[1, "software[1]-setting[1]"] = fasta
out_mztab_mtd.loc[1, "software[1]-setting[2]"] = "db_version:null"
out_mztab_mtd.loc[1, "software[1]-setting[3]"] = (
Expand Down
2 changes: 2 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python:
- 3.11
22 changes: 7 additions & 15 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# recipe/meta.yaml
package:
name: quantms-utils
version: "0.0.12"
version: "0.0.13"

source:
path: ../
Expand All @@ -12,32 +12,24 @@ build:
noarch: python
run_exports:
- {{ pin_subpackage('quantms-utils', max_pin="x.x") }}
script: "{{ PYTHON }} -m pip install . --no-deps -vvv"
script: "{{ PYTHON }} -m pip install . --no-deps --no-build-isolation --no-cache-dir -vvv"
number: 0

requirements:
host:
- python >=3.8,<4.0
- python
- pip
- setuptools
- poetry-core >=1.2.0
run:
- python
- click
- sdrf-pipelines>=0.0.31
- pyopenms
- ms2rescore=3.0.3
- deeplc=2.2.38
- ms2pip=4.0.0.dev8
- psm-utils=0.8.2
- deeplcretrainer
- pydantic=1.10.14
- pandas
- protobuf>=3.9.2,<4 # Ensure compatibility with tensorboard
- numpy
- pyarrow
- pygam
- scipy==1.13.1
- scikit-learn

- psm-utils=0.8.3
test:
imports:
- quantmsutils
Expand All @@ -55,4 +47,4 @@ about:

extra:
recipe-maintainers:
- ypriverol
- ypriverol
11 changes: 1 addition & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@ click
sdrf-pipelines>=0.0.31
pyopenms
ms2rescore==3.0.3
deeplc==2.2.38
ms2pip==4.0.0.dev8
psm-utils==0.8.2
deeplcretrainer
pydantic==1.10.14
pandas
protobuf>=3.9.2,<4 # Ensure compatibility with tensorboard
numpy
pyarrow
pygam
scipy==1.13.1
scikit-learn
setuptools
psm-utils==0.8.3
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit 0046084

Please sign in to comment.