Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new release workflow #201

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9a1023a
replace space with _ in NC-term PTMs
jalew188 Jun 28, 2024
cf4a3af
patch fix maxquant reader
jalew188 Jun 28, 2024
706b0cb
#179 ADD HLA module
jalew188 Jun 29, 2024
5adec02
#179 ADD __init__.py
jalew188 Jun 29, 2024
6b8de67
#179 ADD install pydivsufsort in hla testing notebook
jalew188 Jun 29, 2024
ca2ca32
#179 ADD predict_peptide_df_
jalew188 Jun 29, 2024
fc0174e
#179 use var instead of magic numbers
jalew188 Jul 2, 2024
8ac9e65
#179 more docstrings for methods
jalew188 Jul 2, 2024
8581cbc
#170: apply ruff formatting
mschwoer Jul 2, 2024
195f6c4
#170: add pre-commit instructions to README.md
mschwoer Jul 2, 2024
8c65e6e
Merge pull request #182 from MannLabs/170-code-formatting
jalew188 Jul 2, 2024
4137160
#179 update docs
jalew188 Jul 2, 2024
84e1d2d
Merge branch 'development' into 179-peptdeep-hla
jalew188 Jul 2, 2024
81fa515
ruff formating
jalew188 Jul 2, 2024
57d2aef
#179 Add more docstrings for util functions.
jalew188 Jul 3, 2024
7fed088
Merge pull request #181 from MannLabs/179-peptdeep-hla
jalew188 Jul 3, 2024
bd1ddbd
Merge branch 'development' into fix_double_modification
jalew188 Jul 4, 2024
730be5d
#185 transfer GUI only supports best supported psm_readers
jalew188 Jul 16, 2024
7b7c7fd
#183 init the hla tutorial
jalew188 Jul 16, 2024
ed5cd2a
#183 add immunopeptidomics tutorial in sphix rst
jalew188 Jul 16, 2024
3c30857
add test
wahlema Jul 18, 2024
a77b2fe
tutorial
wahlema Jul 18, 2024
3286f7b
Finished library prediction
wahlema Jul 19, 2024
503ca25
include protein annotation
wahlema Jul 22, 2024
dc0326c
#183 ruff reformat
jalew188 Jul 23, 2024
d500554
#183 hla tutorial move fasta to cur folder
jalew188 Jul 23, 2024
a2cff73
some types
jalew188 Jul 23, 2024
7d90381
#183 to make tests work
jalew188 Jul 23, 2024
768addf
Merge pull request #188 from MannLabs/183-tutorial-immunopeptidomics
jalew188 Aug 4, 2024
a03b91e
Try macos-latest for arm64 in github actions
jalew188 Aug 4, 2024
35d0f5c
Merge pull request #192 from MannLabs/fix_omp_error_macos_arm64
jalew188 Aug 4, 2024
f809300
remove macos from github CI due to diff errors
jalew188 Aug 5, 2024
f60adfe
Merge pull request #193 from MannLabs/rm_macos_in_ci
jalew188 Aug 5, 2024
39f0bdb
numpy<2 to prevent numpy not available error
jalew188 Aug 5, 2024
0154483
Test macos-13 again
jalew188 Aug 5, 2024
d4f0301
#185 remove protein_reverse in gui
jalew188 Aug 5, 2024
d6b701e
Merge branch 'development' into 185-fix-psm-reader-register
jalew188 Aug 5, 2024
9e50434
Merge pull request #186 from MannLabs/185-fix-psm-reader-register
jalew188 Aug 5, 2024
292d7e5
Merge branch 'development' into fix_double_modification to resolve co…
jalew188 Aug 5, 2024
9cb8dd8
Merge pull request #180 from MannLabs/fix_double_modification
jalew188 Aug 5, 2024
e3943e6
add new release workflow action
mschwoer Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Create a draft release and build and upload all installers to it.

on:
workflow_dispatch:
inputs:
commit_to_release:
description: 'Enter commit hash to release (example: ef4037cb571f99cb4919b520fde7174972aae473)'
type: string
required: true
tag_to_release:
description: 'Enter tag to release (example: v1.5.5)'
type: string
required: true

jobs:
create-release:
uses: MannLabs/alphashared/.github/workflows/create-release.yml@v1
with:
package_name: peptdeep
build_nodejs_ui: false
commit_to_release: ${{ inputs.commit_to_release }}
tag_to_release: ${{ inputs.tag_to_release }}
secrets: inherit
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 @@ jobs:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
# macOS-latest and macos-latest-xlarge use Arm64, resulting in MPS OOM error in peptdeep
# os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
# os: [ubuntu-latest, macos-13, macos-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
# os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
# os: [ubuntu-latest, macos-13, macos-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
Expand Down
24 changes: 8 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# User defined:
peptdeep/logs
*.DS_Store
*sandbox*
*installed_models*
*.last_checked*
*mono_crash.*.blob

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -128,19 +136,3 @@ dmypy.json

# Pyre type checker
.pyre/

# User defined:
peptdeep/logs
*.DS_Store
*sandbox*
*installed_models*
*.last_checked*

# nbdev2
*.gitattributes
_docs*
# *_quarto.yml
# *sidebar.yml
*_proc*
# .gitconfig is now autogenerated
.gitconfig
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.4.0
# hooks:
# - id: ruff-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff-format
# - id: ruff

exclude: .bumpversion.cfg
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,12 @@ common:
user_defined_modifications: {}
# For example,
# user_defined_modifications:
# "Dimethyl2@Any N-term":
# "Dimethyl2@Any_N-term":
# composition: "H(2)2H(2)C(2)"
# modloss_composition: "H(0)" # can be without if no modloss
# "Dimethyl2@K":
# composition: "H(2)2H(2)C(2)"
# "Dimethyl6@Any N-term":
# "Dimethyl6@Any_N-term":
# composition: "2H(4)13C(2)"
# "Dimethyl6@K":
# composition: "2H(4)13C(2)"
Expand Down Expand Up @@ -496,16 +496,16 @@ library:
fix_mods:
- Carbamidomethyl@C
var_mods:
- Acetyl@Protein N-term
- Acetyl@Protein_N-term
- Oxidation@M
special_mods: [] # normally for Phospho or GlyGly@K
special_mods_cannot_modify_pep_n_term: False
special_mods_cannot_modify_pep_c_term: False
labeling_channels: {}
# For example,
# labeling_channels:
# 0: ['Dimethyl@Any N-term','Dimethyl@K']
# 4: ['Dimethyl:2H(2)@Any N-term','Dimethyl:2H(2)@K']
# 0: ['Dimethyl@Any_N-term','Dimethyl@K']
# 4: ['Dimethyl:2H(2)@Any_N-term','Dimethyl:2H(2)@K']
# 8: [...]
min_var_mod_num: 0
max_var_mod_num: 2
Expand Down Expand Up @@ -565,7 +565,7 @@ See examples:
import pandas as pd
df = pd.DataFrame({
'sequence': ['ACDEFGHIK','LMNPQRSTVK','WYVSTR'],
'mods': ['Carbamidomethyl@C','Acetyl@Protein N-term;Phospho@S',''],
'mods': ['Carbamidomethyl@C','Acetyl@Protein_N-term;Phospho@S',''],
'mod_sites': ['2','0;7',''],
'charge': [2,3,1],
})
Expand Down Expand Up @@ -593,7 +593,7 @@ df[['sequence','mods','mod_sites']]
| | sequence | mods | mod_sites |
| --- | --- | --- | --- |
| 0 | ACDEFGHIK | Carbamidomethyl@C | 2 |
| 1 | LMNPQRSTVK | Acetyl@Protein N-term;Phospho@S | 0;7 |
| 1 | LMNPQRSTVK | Acetyl@Protein_N-term;Phospho@S | 0;7 |
| 2 | WYVSTR | | |

##### precursor_table
Expand All @@ -605,7 +605,7 @@ df
| | sequence | mods | mod_sites | charge |
| --- | --- | --- | --- | --- |
| 0 | ACDEFGHIK | Carbamidomethyl@C | 2 | 2 |
| 1 | LMNPQRSTVK | Acetyl@Protein N-term;Phospho@S | 0;7 | 3 |
| 1 | LMNPQRSTVK | Acetyl@Protein_N-term;Phospho@S | 0;7 | 3 |
| 2 | WYVSTR | | | 1 |

> Columns of `proteins` and `genes` are optional for these txt/tsv/csv
Expand Down Expand Up @@ -686,7 +686,7 @@ model_mgr:
# alphabase modification to modifications of other search engines
# For example,
# psm_modification_mapping:
# Dimethyl@Any N-term:
# Dimethyl@Any_N-term:
# - _(Dimethyl-n-0)
# - _(Dimethyl)
# Dimethyl:2H(2)@K:
Expand Down Expand Up @@ -942,8 +942,21 @@ clone the repository and create a [pull
request](https://github.com/MannLabs/alphapeptdeep/pulls) with a new
branch. For an even more interactive participation, check out the
[discussions](https://github.com/MannLabs/alphapeptdeep/discussions) and
the [the Contributors License Agreement](misc/CLA.md).
the [Contributors License Agreement](misc/CLA.md).

### Notes for developers
#### pre-commit hooks
It is highly recommended to use the provided pre-commit hooks, as the CI pipeline enforces all checks therein to
pass in order to merge a branch.

The hooks need to be installed once by
```bash
pre-commit install
```
You can run the checks yourself using:
```bash
pre-commit run --all-files
```
------------------------------------------------------------------------

## Changelog
Expand Down
42 changes: 21 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
import sys
import importlib
import inspect
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))


# -- Project information -----------------------------------------------------

project = 'peptdeep'
copyright = '2022, Mann Labs, MPIB'
author = 'Mann Labs, MPIB'
project = "peptdeep"
copyright = "2022, Mann Labs, MPIB"
author = "Mann Labs, MPIB"

release = "1.2.1"

Expand All @@ -31,34 +32,33 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.napoleon',
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.linkcode",
'sphinx.ext.viewcode',
'autodocsumm',
'nbsphinx',
'myst_parser',
"sphinx.ext.viewcode",
"autodocsumm",
"nbsphinx",
"myst_parser",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
'_build', 'Thumbs.db', '.DS_Store',
'_modidx,py'
]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "_modidx,py"]

code_url = f"https://github.com/mannlabs/alphapeptdeep/blob/main"


def linkcode_resolve(domain, info):
# Non-linkable objects from the starter kit in the tutorial.
if domain == "js" or info["module"] == "connect4":
return

if domain != "py": return
if domain != "py":
return

mod = importlib.import_module(info["module"])
if "." in info["fullname"]:
Expand Down Expand Up @@ -93,16 +93,16 @@ def linkcode_resolve(domain, info):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_logo = '_static/peptdeep.png'
html_favicon = '_static/peptdeep.png'
html_theme = "furo"
html_logo = "_static/peptdeep.png"
html_favicon = "_static/peptdeep.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

autodoc_default_options = {
'autosummary': True,
'special-members': '__init__', # Include __init__ methods.
"autosummary": True,
"special-members": "__init__", # Include __init__ methods.
}
5 changes: 0 additions & 5 deletions docs/nbs/tutorial_HLA_prediction.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/notebooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Tutorials and notebooks about how to use AlphaPeptDeep
.. toctree::
:maxdepth: 1

tutorials/tutorial_immunopeptidomics
nbs/tutorial_models_from_scratch
nbs/tutorial_speclib_from_fasta
nbs/alphapeptdeep_hdf_to_tsv
nbs/tutorial_HLA_prediction
nbs/tutorial_model_manager
nbs/tutorial_building_rt_model
nbs/tutorial_building_ccs_model
9 changes: 9 additions & 0 deletions docs/tutorials/example.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
>tr|A0A024R161|A0A024R161_HUMAN Guanine nucleotide-binding protein subunit gamma OS=Homo sapiens GN=DNAJC25-GNG10 PE=3 SV=1
MGAPLLSPGWGAGAAGRRWWMLLAPLLPALLLVRPAGALVEGLYCGTRDCYEVLGVSRSA
GKAEIARAYRQLARRYHPDRYRPQPGDEGPGRTPQSAEEAFLLVATAYETLKVSQAAAEL
QQYCMQNACKDALLVGVPAGSNPFREPRSCALL
>tr|A0A024RAP8|A0A024RAP8_HUMAN HCG2009644, isoform CRA_b OS=Homo sapiens GN=KLRC4-KLRK1 PE=4 SV=1
MGWIRGRRSRHSWEMSEFHNYNLDLKKSDFSTRWQKQRCPVVKSKCRENASPFFFCCFIA
VAMGIRFIIMVTIWSAVFLNSLFNQEVQIPLTESYCGPCPKNWICYKNNCYQFFDESKNW
YESQASCMSQNASLLKVYSKEDQDLLKLVKSYHWMGLVHIPTNGSWQWEDGSILSPNLLT
IIEMQKGDCALYASSFKGYIENCSTPNTYICMQRTV
Loading
Loading