Skip to content

Commit

Permalink
Merge pull request #65 from MannLabs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jalew188 authored Dec 27, 2022
2 parents 0132e66 + 3ace28f commit a12b0ab
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.3
current_version = 0.3.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
30 changes: 24 additions & 6 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
## Changelog
# Changelog

### 0.0.1
Follow the changelog format from https://keepachangelog.com/en/1.0.0/.

* FEAT: Initial creation of AlphaBase.
## 1.0.0 - TODO Next Release

### 0.2.0
## 0.3.0 - 2022.12.27

### Added

- `alphabase.protein.fasta.SpecLibFasta.add_peptide_labeling()` supports mDIA.
- `alphabase.spectral_library.flat.SpecLibFlat` class for flat spec_lib.
- Move `alphabase.spectral_library.translate` module (.py) from alphapeptdeep to alphabase.
- `alphabase.constants.modification.add_new_modifications()` to add user-defined modifications that are not in UniMod.
- `alphabase.psm_reader.psm_reader.PSMReaderBase.add_modification_mapping()` to support arbitrary modifications of different search engines.
- `alphabase.statistics.regression.LOESSRegression`
- `alphabase.scoring` module added but not finished yet.

### Changed

- Use sphinx and readthedocs for documentation. nbdev is no longer for documentation, it is only used for unit testing (`nbdev_test`).
- FastaLib to SpecLibFasta.
- Protease: `trypsin`==`trypsin/p`, add `trypsin_not_p` will not cleave peptides before N-term of P.

## 0.2.0

First official release.

### 0.2.1
## 0.0.1

Using Sphinx and readthedocs for documentation.
FEAT: Initial creation of AlphaBase.
13 changes: 6 additions & 7 deletions alphabase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@


__project__ = "alphabase"
__version__ = "0.2.3"
__version__ = "0.3.0"
__license__ = "Apache"
__description__ = "An open-source Python package of the AlphaPept ecosystem"
__description__ = "An infrastructure Python package of the AlphaX ecosystem"
__author__ = "Mann Labs"
__author_email__ = "opensource@alphapept.com"
__author_email__ = "jalew188@gmail.com"
__github__ = "https://github.com/MannLabs/alphabase"
__keywords__ = [
"bioinformatics",
"software",
"AlphaPept ecosystem",
"AlphaX ecosystem",
]
__python_version__ = ">=3.8,<3.10"
__classifiers__ = [
Expand All @@ -35,9 +35,8 @@
"Mann Labs at MPIB": "https://www.biochem.mpg.de/mann",
"Mann Labs at CPR": "https://www.cpr.ku.dk/research/proteomics/mann/",
"GitHub": __github__,
# "ReadTheDocs": None,
# "PyPi": None,
# "Scientific paper": None,
"Docs": "https://alphabase.readthedocs.io/en/latest/",
"PyPi": "https://pypi.org/project/alphabase/",
}
__extra_requirements__ = {
"development": "requirements_development.txt",
Expand Down
13 changes: 12 additions & 1 deletion alphabase/protein/fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,8 @@ def add_peptide_labeling(self, labeling_channel_dict:dict=None):
8: ['Dimethyl:2H(6)13C(2)@Any N-term','Dimethyl:2H(6)13C(2)@K'],
}
```.
The key name could be int (recommended) or str, and the value must be
The key name could be int (highly recommended or
must be in the future) or str, and the value must be
a list of modification names (str) in alphabase format.
It is set to `self.labeling_channels` if None.
Defaults to None
Expand All @@ -1191,6 +1192,16 @@ def add_peptide_labeling(self, labeling_channel_dict:dict=None):
df['labeling_channel'] = channel
df_list.append(df)
self._precursor_df = pd.concat(df_list, ignore_index=True)
try:
self._precursor_df[
'labeling_channel'
] = self._precursor_df.labeling_channel.astype(np.int32)
if 'labeling_channel' not in self.key_numeric_columns:
self.key_numeric_columns.append('labeling_channel')
except:
if 'labeling_channel' in self.key_numeric_columns:
self.key_numeric_columns.remove('labeling_channel')


def add_charge(self):
"""Add charge states
Expand Down
3 changes: 2 additions & 1 deletion alphabase/spectral_library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class SpecLibBase(object):
'miss_cleavage', 'mobility_pred',
'nAA',
'precursor_mz',
'rt_pred', 'rt_norm_pred'
'rt_pred', 'rt_norm_pred',
'labeling_channel',
]
"""
list of str: Key numeric columns to be saved
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
copyright = '2022, Mann Labs, MPIB'
author = 'Mann Labs, MPIB'

release = "0.2.3"
release = "0.3.0"

# -- General configuration ---------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions release/one_click_linux_gui/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: AlphaBase
Version: 0.2.3
Version: 0.3.0
Architecture: all
Maintainer: Mann Labs <opensource@alphapept.com>
Description: AlphaBase
AlphaBase is an open-source Python package in the AlphaPept ecosystem.
AlphaBase is an open-source Python package in the AlphaX ecosystem.
AlphaBase was developed by the Mann Labs at the Max Planck Institute of Biochemistry and University of Copenhagen and is freely available with an Apache License. Additional third-party licenses are applicable for external Python packages (see https://github.com/MannLabs/AlphaBase for more details.).
2 changes: 1 addition & 1 deletion release/one_click_linux_gui/create_installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_linux_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "../../dist/alphabase-0.2.3-py3-none-any.whl[stable]"
pip install "../../dist/alphabase-0.3.0-py3-none-any.whl[stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleIconFile</key>
<string>alpha_logo.icns</string>
<key>CFBundleIdentifier</key>
<string>alphabase.0.2.3</string>
<string>alphabase.0.3.0</string>
<key>CFBundleShortVersionString</key>
<string>0.2.3</string>
<string>0.3.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/create_installer_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ python setup.py sdist bdist_wheel

# Setting up the local package
cd release/one_click_macos_gui
pip install "../../dist/alphabase-0.2.3-py3-none-any.whl[stable]"
pip install "../../dist/alphabase-0.3.0-py3-none-any.whl[stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller
Expand All @@ -40,5 +40,5 @@ cp ../../LICENSE.txt Resources/LICENSE.txt
cp ../logos/alpha_logo.png Resources/alpha_logo.png
chmod 777 scripts/*

pkgbuild --root dist/alphabase --identifier de.mpg.biochem.alphabase.app --version 0.2.3 --install-location /Applications/AlphaBase.app --scripts scripts AlphaBase.pkg
pkgbuild --root dist/alphabase --identifier de.mpg.biochem.alphabase.app --version 0.3.0 --install-location /Applications/AlphaBase.app --scripts scripts AlphaBase.pkg
productbuild --distribution distribution.xml --resources Resources --package-path AlphaBase.pkg dist/alphabase_gui_installer_macos.pkg
2 changes: 1 addition & 1 deletion release/one_click_macos_gui/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>AlphaBase 0.2.3</title>
<title>AlphaBase 0.3.0</title>
<background mime-type="image/png" file="alpha_logo.png" scaling="proportional"/>
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_windows_gui/alphabase_innoinstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AlphaBase"
#define MyAppVersion "0.2.3"
#define MyAppVersion "0.3.0"
#define MyAppPublisher "Max Planck Institute of Biochemistry and the University of Copenhagen, Mann Labs"
#define MyAppURL "https://github.com/MannLabs/alphabase"
#define MyAppExeName "alphabase_gui.exe"
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_windows_gui/create_installer_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_windows_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "../../dist/alphabase-0.2.3-py3-none-any.whl[stable]"
pip install "../../dist/alphabase-0.3.0-py3-none-any.whl[stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller
Expand Down
6 changes: 3 additions & 3 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### Python library ###
repo = alphabase
lib_name = alphabase
version = 0.2.3
version = 0.3.0
min_python = 3.7
license = apache2

Expand All @@ -31,8 +31,8 @@ audience = Developers
author = Wen-Feng Zeng, Sander Willems, Maximilian Strauss
author_email = wzeng@biochem.mpg.de, jalew188@gmail.com
copyright = MannLabs
description = Base functionalities for AlphaPept Ecosystems
keywords = proteomics, mass spec, alphapept, infrastucture
description = Base functionalities for AlphaX Ecosystems
keywords = proteomics, mass spec, alphaX, infrastucture
language = English
status = 2
user = MannLabs
Expand Down

0 comments on commit a12b0ab

Please sign in to comment.