Skip to content

Commit

Permalink
Merge pull request #115 from MannLabs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
swillems authored Apr 23, 2021
2 parents 1b6aa0b + c10312b commit f9d405e
Show file tree
Hide file tree
Showing 27 changed files with 16,208 additions and 773 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/version_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Master version bumped
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ')
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
github_version=$(curl "https://raw.githubusercontent.com/MannLabs/alphatims/master/alphatims/__init__.py" | grep "__version__" | cut -f3 -d ' ')
if [ "$current_version" = "$github_version" ]; then
echo "Version is not updated"
Expand All @@ -22,8 +22,8 @@ jobs:
- name: Tutorial notebook updated
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ')
tutorial_version=(grep "alphatims" nbs/tutorial_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
tutorial_version=$(grep "alphatims" nbs/tutorial_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
if [ "$current_version" != "$tutorial_version" ]; then
echo "Version is not updated"
echo "current: $current_version new: $tutorial_version"
Expand All @@ -32,22 +32,23 @@ jobs:
- name: Performance notebook updated
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ')
performance_version=(grep "alphatims" nbs/performance_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
performance_version=$(grep "alphatims" nbs/performance_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
if [ "$current_version" != "$performance_version" ]; then
echo "Version is not updated"
echo "current: $current_version new: $performance_version"
exit 1
fi
- name: Readme performance updated
- name: Readme updated
shell: bash -l {0}
run: |
echo "TODO check if readme performance equals performance notebook"
echo "Make sure the readme is updated"
- name: GUI_manual.pdf updated
shell: bash -l {0}
run: |
echo "make sure the GUI_manual.pdf is updated"
# TODO git does not preserve timestamps, so following is impossible
if [ misc/gui_manual.docx -nt alphatims/docs/gui_manual.pdf ]; then
echo "GUI manual was not updated"
exit 1
fi
# if [ misc/gui_manual.docx -nt alphatims/docs/gui_manual.pdf ]; then
# echo "GUI manual was not updated"
# exit 1
# fi
29 changes: 2 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Pip installation](https://github.com/MannLabs/alphatims/workflows/Default%20installation%20and%20tests/badge.svg)
![GUI and PyPi releases](https://github.com/MannLabs/alphatims/workflows/Create%20all%20GUI%20releases%20and%20publish%20on%20PyPi/badge.svg)
![GUI and PyPi releases](https://github.com/MannLabs/alphatims/workflows/Publish%20on%20PyPi%20and%20release%20on%20GitHub/badge.svg)

---
# AlphaTims
Expand Down Expand Up @@ -248,32 +248,7 @@ Performance can be measured in function of [speed](#speed) or [RAM](#ram) usage.

### Speed

Typical time performance statistics on data in-/output and slicing of standard [HeLa datasets](#test-sample) include:

| type | gradient | datapoints | reading (raw/HDF) | export HDF| slicing (in ms) |
|------|----------|---------------|-------------------|--------|----------------------------|
| DDA | 6 min | 214,172,697 | 1.48 s / 445 ms | 569 ms | 1.85 / 48 / 27.1 / 89.7 |
| DIA | 6 min | 158,552,099 | 1.06 s / 295 ms | 409 ms | 7.35 / 24.1 / 649 / 110 |
| DDA | 21 min | 295,251,252 | 3.07 s / 755 ms | 779 ms | 2.17 / 68.3 / 106 / 181 |
| DIA | 21 min | 730,564,765 | 5.24 s / 1.90 s | 1.79 s | 0.860 / 123 / 4910 / 392 |
| DDA | 120 min | 2,074,019,899 | 23.2 s / 10.1 s | 4.94 s | 0.671 / 338 / 557 / 1100 |

All slices were performed in a single dimension. Including more slices makes the analysis more stringent and hence faster. The considered dimensions were:

* **LC:** 100.0 <= retention_time < 100.5
* **TIMS:** scan_index = 450
* **Quadrupole:** 700.0 <= quad_mz_values < 710.0
* **TOF:** 621.9 <= tof_mz_values < 622.1

All of these analyses were timed with `timeit` and are the average of at least 7 runs. They were obtained on the following system:

* **MacBook Pro:** 13-inch, 2020, Four Thunderbolt 3 ports
* **OS version:** macOS Catalina 10.15.7
* **Processor:** 2.3 GHz Quad-Core Intel Core i7
* **Memory:** 32 GB 3733 MHz LPDDR4X
* **Startup Disk:** Macintosh HD

Full details are available in the [performance notebook](nbs/performance.ipynb).
Typical time performance statistics on data in-/output and slicing of standard [HeLa datasets](#test-sample) are available in the [performance notebook](nbs/performance.ipynb).

### RAM

Expand Down
2 changes: 1 addition & 1 deletion alphatims/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


__project__ = "alphatims"
__version__ = "0.2.4"
__version__ = "0.2.5"
__license__ = "Apache"
__description__ = "A Python package to index Bruker TimsTOF raw data for fast and easy accession and visualization"
__author__ = "Sander Willems, Eugenia Voytik"
Expand Down
32 changes: 17 additions & 15 deletions alphatims/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,33 @@ def show_platform_info() -> None:
This is done in the following format:
- [timestamp]> Platform information:
- [timestamp]> system - [...]
- [timestamp]> release - [...]
- [timestamp]> version - [...]
- [timestamp]> machine - [...]
- [timestamp]> processor - [...]
- [timestamp]> cpu count - [...]
- [timestamp]> ram - [...]/[...] Gb (available/total)
- [timestamp]> system - [...]
- [timestamp]> release - [...]
- [timestamp]> version - [...]
- [timestamp]> machine - [...]
- [timestamp]> processor - [...]
- [timestamp]> cpu count - [...]
- [timestamp]> cpu frequency - [...]
- [timestamp]> ram - [...]/[...] Gb (available/total)
"""
import platform
import psutil
logging.info("Platform information:")
logging.info(f"system - {platform.system()}")
logging.info(f"release - {platform.release()}")
logging.info(f"system - {platform.system()}")
logging.info(f"release - {platform.release()}")
if platform.system() == "Darwin":
logging.info(f"version - {platform.mac_ver()[0]}")
logging.info(f"version - {platform.mac_ver()[0]}")
else:
logging.info(f"version - {platform.version()}")
logging.info(f"machine - {platform.machine()}")
logging.info(f"processor - {platform.processor()}")
logging.info(f"version - {platform.version()}")
logging.info(f"machine - {platform.machine()}")
logging.info(f"processor - {platform.processor()}")
logging.info(
f"cpu count - {psutil.cpu_count()}"
f"cpu count - {psutil.cpu_count()}"
# f" ({100 - psutil.cpu_percent()}% unused)"
)
logging.info(f"cpu frequency - {psutil.cpu_freq().current:.2f} Mhz")
logging.info(
f"ram - "
f"ram - "
f"{psutil.virtual_memory().available/1024**3:.1f}/"
f"{psutil.virtual_memory().total/1024**3:.1f} Gb "
f"(available/total)"
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 = 0.2.4
current_version = 0.2.5
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
16 changes: 13 additions & 3 deletions misc/checklist.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
######## ALWAYS TODO ########

Versions updated
conda activate alphatims
cd misc
# bumpversion patch --new-version VERSION --config-file bumpversion.cfg
bumpversion patch --config-file bumpversion.cfg
conda deactivate
# bumpversion patch --new-version VERSION --config-file bumpversion.cfg

No TODOs left?

Tutorial/manual/performance/README updated?
jupyter nbconvert --execute --to notebook --NotebookClient.kernel_name="python" nbs/tutorial.ipynb nbs/performance.ipynb
README updated?

Manual updated?
if [ misc/gui_manual.docx -nt alphatims/docs/gui_manual.pdf ]; then
echo "GUI manual was not updated"
fi

Tutorial and performance?
conda activate alphatims
jupyter nbconvert --execute --inplace --to notebook --NotebookClient.kernel_name="python" nbs/tutorial.ipynb nbs/performance.ipynb
jupyter nbconvert --to html --NotebookClient.kernel_name="python" nbs/tutorial.ipynb nbs/performance.ipynb
conda deactivate



Expand Down
2 changes: 1 addition & 1 deletion misc/one_click_linux/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: AlphaTims
Version: 0.2.4
Version: 0.2.5
Architecture: all
Maintainer: Mann Labs <[email protected]>
Description: AlphaTims GUI
Expand Down
2 changes: 1 addition & 1 deletion misc/one_click_linux/create_installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rm -rf dist
rm -rf build
python setup.py sdist bdist_wheel
cd misc/one_click_linux
pip install "../../dist/alphatims-0.2.4-py3-none-any.whl[plotting]"
pip install "../../dist/alphatims-0.2.5-py3-none-any.whl[plotting]"
pip install pyinstaller==4.2
pyinstaller ../pyinstaller/alphatims.spec -y
conda deactivate
Expand Down
4 changes: 2 additions & 2 deletions misc/one_click_macos/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>alphatims.0.2.4</string>
<string>alphatims.0.2.5</string>
<key>CFBundleShortVersionString</key>
<string>0.2.4</string>
<string>0.2.5</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
6 changes: 3 additions & 3 deletions misc/one_click_macos/create_installer_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rm -rf build
python setup.py sdist bdist_wheel
cd misc/one_click_macos
pip install pyinstaller==4.2
pip install "../../dist/alphatims-0.2.4-py3-none-any.whl[plotting]"
pip install "../../dist/alphatims-0.2.5-py3-none-any.whl[plotting]"
conda list
pyinstaller ../pyinstaller/alphatims.spec -y
conda deactivate
Expand All @@ -33,7 +33,7 @@ if false; then
# https://scriptingosx.com/2019/09/notarize-a-command-line-tool/
for f in $(find dist/alphatims -name '*.so' -or -name '*.dylib'); do codesign --sign "Developer ID Application: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)" $f; done
codesign --sign "Developer ID Application: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)" dist/alphatims/Contents/MacOS/alphatims_gui --force --options=runtime --entitlements entitlements.xml
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.4 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg --sign "Developer ID Installer: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)"
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.5 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg --sign "Developer ID Installer: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)"
productbuild --distribution distribution.xml --resources Resources --package-path alphatims.pkg dist/alphatims_gui_installer_macos.pkg --sign "Developer ID Installer: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)"
requestUUID=$(xcrun altool --notarize-app --primary-bundle-id "de.mpg.biochem.alphatims.app" --username "[email protected]" --password "@keychain:Alphatims-develop" --asc-provider 7QSY5527AQ --file dist/alphatims_gui_installer_macos.pkg 2>&1 | awk '/RequestUUID/ { print $NF; }')
request_status="in progress"
Expand All @@ -45,6 +45,6 @@ if false; then
xcrun altool --notarization-info "$requestUUID" --username "[email protected]" --password "@keychain:Alphatims-develop"
xcrun stapler staple dist/alphatims_gui_installer_macos.pkg
else
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.4 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.5 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg
productbuild --distribution distribution.xml --resources Resources --package-path alphatims.pkg dist/alphatims_gui_installer_macos.pkg
fi
2 changes: 1 addition & 1 deletion misc/one_click_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>AlphaTims 0.2.4</title>
<title>AlphaTims 0.2.5</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 misc/one_click_windows/alphatims_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 "AlphaTims"
#define MyAppVersion "0.2.4"
#define MyAppVersion "0.2.5"
#define MyAppPublisher "Max Planck Institute of Biochemistry, Mann department"
#define MyAppURL "https://github.com/MannLabs/alphatims"
#define MyAppExeName "alphatims_gui.exe"
Expand Down
2 changes: 1 addition & 1 deletion misc/one_click_windows/create_installer_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ call rmdir dist /s /q
call rmdir build /s /q
call python setup.py sdist bdist_wheel
call cd misc/one_click_windows
call pip install "../../dist/alphatims-0.2.4-py3-none-any.whl[plotting]"
call pip install "../../dist/alphatims-0.2.5-py3-none-any.whl[plotting]"
call pip install pyinstaller==4.2
call pyinstaller ../pyinstaller/alphatims.spec -y
call conda deactivate
Expand Down
2 changes: 1 addition & 1 deletion misc/one_click_windows/create_installer_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm -rf dist
rm -rf build
python setup.py sdist bdist_wheel
cd misc/one_click_windows
pip install "../../dist/alphatims-0.2.4-py3-none-any.whl[plotting]"
pip install "../../dist/alphatims-0.2.5-py3-none-any.whl[plotting]"
pip install pyinstaller==4.2
# TODO https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error/60405693#60405693
pyinstaller ../pyinstaller/alphatims.spec -y
Expand Down
10 changes: 2 additions & 8 deletions misc/pyinstaller/alphatims_pyinstaller.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
if __name__ == "__main__":
import alphatims.utils
log_file_name = alphatims.utils.set_logger(
log_file_name=alphatims.utils.INTERFACE_PARAMETERS["log_file"][
"default"
]
)
threads = alphatims.utils.set_threads(
alphatims.utils.INTERFACE_PARAMETERS["threads"]["default"]
)
log_file_name = alphatims.utils.set_logger(log_file_name="")
threads = alphatims.utils.set_threads(-1)
alphatims.utils.show_platform_info()
alphatims.utils.show_python_info()
alphatims.utils.check_github_version()
Expand Down
Loading

0 comments on commit f9d405e

Please sign in to comment.