From 2f6dcbf54fea7ba344fde3f0900faf6f230c09e9 Mon Sep 17 00:00:00 2001 From: David Helminiak Date: Mon, 27 Feb 2023 14:21:28 -0600 Subject: [PATCH 01/11] Prevent logging messages at import time When parallelizing loading operations in a Ray environment, external libraries are automatically imported in external workers/subprocesses. Since several warnings were automatically logged on import (i.e., before there's been a chance to manually define logger filters/limits in the new subprocesses), this clutters the terminal/console with repeated and redundant notices. Moving the applicable calls into objects or definitions, and preventing their immediate calls at import time solves this issue. --- alphatims/bruker.py | 26 ++++++++++++++++---------- alphatims/tempmmap.py | 21 +++++++++------------ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/alphatims/bruker.py b/alphatims/bruker.py index cb15230f..6402b01b 100644 --- a/alphatims/bruker.py +++ b/alphatims/bruker.py @@ -29,18 +29,8 @@ "timsdata.so" ) else: - logging.warning( - "WARNING: " - "No Bruker libraries are available for this operating system. " - "Mobility and m/z values need to be estimated. " - "While this estimation often returns acceptable results with errors " - "< 0.02 Th, huge errors (e.g. offsets of 6 Th) have already been " - "observed for some samples!" - ) - logging.info("") BRUKER_DLL_FILE_NAME = "" - def init_bruker_dll(bruker_dll_file_name: str = BRUKER_DLL_FILE_NAME): """Open a bruker.dll in Python. @@ -996,6 +986,22 @@ def __init__( This is ignored if the polarity is dropped. Default is True. """ + + #Log a warning if there was not a valid DLL filename + if BRUKER_DLL_FILE_NAME=="": + logging.warning( + "WARNING: " + "No Bruker libraries are available for this operating system. " + "Mobility and m/z values need to be estimated. " + "While this estimation often returns acceptable results with errors " + "< 0.02 Th, huge errors (e.g. offsets of 6 Th) have already been " + "observed for some samples!" + ) + logging.info("") + + #Create temporary folder containing temp mmapped arrays + tm.make_temp_dir() + if bruker_d_folder_name.endswith("/"): bruker_d_folder_name = bruker_d_folder_name[:-1] logging.info(f"Importing data from {bruker_d_folder_name}") diff --git a/alphatims/tempmmap.py b/alphatims/tempmmap.py index 33b7f45e..05ab63ff 100644 --- a/alphatims/tempmmap.py +++ b/alphatims/tempmmap.py @@ -15,6 +15,9 @@ # local import alphatims.utils +ARRAYS = {} +CLOSED = False +ALLOW_NDARRAY_SUBCLASS = False def make_temp_dir(prefix: str = "temp_mmap_") -> tuple: """Make a temporary directory. @@ -31,21 +34,15 @@ def make_temp_dir(prefix: str = "temp_mmap_") -> tuple: """ _temp_dir = tempfile.TemporaryDirectory(prefix=prefix) temp_dir_name = _temp_dir.name - return _temp_dir, temp_dir_name - - -_TEMP_DIR, TEMP_DIR_NAME = make_temp_dir() -ARRAYS = {} -CLOSED = False -ALLOW_NDARRAY_SUBCLASS = False - -logging.warning( - f"WARNING: Temp mmap arrays are written to {TEMP_DIR_NAME}. " + + logging.warning( + f"WARNING: Temp mmap arrays are written to {temp_dir_name}. " "Cleanup of this folder is OS dependant, " "and might need to be triggered manually! " - f"Current space: {shutil.disk_usage(TEMP_DIR_NAME)[-1]:,}" + f"Current space: {shutil.disk_usage(temp_dir_name)[-1]:,}" ) - + + return _temp_dir, temp_dir_name def empty(shape: tuple, dtype: np.dtype) -> np.ndarray: """Create a writable temporary mmapped array. From 286bd99a1de247d3f7521017e64817af1f7bfc8c Mon Sep 17 00:00:00 2001 From: David Helminiak Date: Mon, 27 Feb 2023 14:28:43 -0600 Subject: [PATCH 02/11] Prevent logging messages at import time When parallelizing loading operations in a Ray environment, external libraries are automatically imported in external workers/subprocesses. Since several warnings were automatically logged on import (i.e., before there's been a chance to manually define logger filters/limits in the new subprocesses), this clutters the terminal/console with repeated and redundant notices. Moving the applicable calls into objects or definitions, and preventing their immediate calls at import time solves this issue. --- alphatims/bruker.py | 3 --- alphatims/tempmmap.py | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/alphatims/bruker.py b/alphatims/bruker.py index 6402b01b..896fa660 100644 --- a/alphatims/bruker.py +++ b/alphatims/bruker.py @@ -998,9 +998,6 @@ def __init__( "observed for some samples!" ) logging.info("") - - #Create temporary folder containing temp mmapped arrays - tm.make_temp_dir() if bruker_d_folder_name.endswith("/"): bruker_d_folder_name = bruker_d_folder_name[:-1] diff --git a/alphatims/tempmmap.py b/alphatims/tempmmap.py index 05ab63ff..255b3535 100644 --- a/alphatims/tempmmap.py +++ b/alphatims/tempmmap.py @@ -15,9 +15,6 @@ # local import alphatims.utils -ARRAYS = {} -CLOSED = False -ALLOW_NDARRAY_SUBCLASS = False def make_temp_dir(prefix: str = "temp_mmap_") -> tuple: """Make a temporary directory. @@ -34,16 +31,14 @@ def make_temp_dir(prefix: str = "temp_mmap_") -> tuple: """ _temp_dir = tempfile.TemporaryDirectory(prefix=prefix) temp_dir_name = _temp_dir.name - - logging.warning( - f"WARNING: Temp mmap arrays are written to {temp_dir_name}. " - "Cleanup of this folder is OS dependant, " - "and might need to be triggered manually! " - f"Current space: {shutil.disk_usage(temp_dir_name)[-1]:,}" -) - return _temp_dir, temp_dir_name + +_TEMP_DIR, TEMP_DIR_NAME = make_temp_dir() +ARRAYS = {} +CLOSED = False +ALLOW_NDARRAY_SUBCLASS = False + def empty(shape: tuple, dtype: np.dtype) -> np.ndarray: """Create a writable temporary mmapped array. @@ -269,6 +264,14 @@ def reset() -> str: del _TEMP_DIR _TEMP_DIR, TEMP_DIR_NAME = make_temp_dir() ARRAYS = {} + + logging.warning( + f"WARNING: Temp mmap arrays were written to {TEMP_DIR_NAME}. " + "Cleanup of this folder is OS dependant, " + "and might need to be triggered manually! " + f"Current space: {shutil.disk_usage(TEMP_DIR_NAME)[-1]:,}" + ) + return TEMP_DIR_NAME From 94cbebdcef882c0e949709f21a0c9346e3bb7111 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 20 Mar 2023 12:32:38 -0700 Subject: [PATCH 03/11] (wip) added dockerfile and cicd to publish the image --- .github/workflows/publish_and_release.yml | 47 +++++++++++++++++++++++ Dockerfile | 15 ++++++++ 2 files changed, 62 insertions(+) create mode 100644 Dockerfile diff --git a/.github/workflows/publish_and_release.yml b/.github/workflows/publish_and_release.yml index 3cce64d3..e4c3f03b 100644 --- a/.github/workflows/publish_and_release.yml +++ b/.github/workflows/publish_and_release.yml @@ -6,6 +6,10 @@ on: name: Publish on PyPi and release on GitHub +env: + REGISTRY: ghcr.io + IMAGE_NAME: MannLabs/alphatims + jobs: Version_Bumped: runs-on: ubuntu-latest @@ -193,6 +197,49 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }} + + Create_Docker_Release: + # Adapted from wfondrie/mokapot's docker actions + runs-on: ubuntu-latest + needs: [Create_Linux_Release] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Build Wheel + run: | + python setup.py bdist_wheel + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to the GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Push the Docker image to the GHCR + uses: docker/build-push-action@v3 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + Test_PyPi_Release: name: Test_PyPi_version_on_${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c6ab129d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ + +FROM python:3.9-slim +WORKDIR /app +RUN apt-get update && apt-get install -y build-essential gcc python3-dev +COPY dist/*.whl /app/ + +# RUN python3 -m pip install ".[plotting-stable]" # Image is 1.6gb with plotting +# The size is reduced to 847 mb without it. +RUN python3 -m pip install /app/*.whl +# RUN python3 -m pip cache purge + +ENTRYPOINT [ "alphatims" ] + + + From 1597fed9eb7685645bf29a79928f5c43fa1e6774 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 20 Mar 2023 12:38:11 -0700 Subject: [PATCH 04/11] (wip) added purging of pypi cache to the dockerfile --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6ab129d..eabcaaf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,6 @@ COPY dist/*.whl /app/ # RUN python3 -m pip install ".[plotting-stable]" # Image is 1.6gb with plotting # The size is reduced to 847 mb without it. RUN python3 -m pip install /app/*.whl -# RUN python3 -m pip cache purge +RUN python3 -m pip cache purge ENTRYPOINT [ "alphatims" ] - - - From b640ca074646c7da837445345e38778c7cb366f7 Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 23 Mar 2023 18:37:55 -0700 Subject: [PATCH 05/11] added plataform to build dockerfile --- Dockerfile | 18 ++++++++++++++---- README.md | 9 +++++++++ alphatims/utils.py | 4 +++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index eabcaaf3..bd6723bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,22 @@ -FROM python:3.9-slim -WORKDIR /app +# FROM python:3.9-slim +FROM --platform=linux/amd64 python:3.9-bullseye + RUN apt-get update && apt-get install -y build-essential gcc python3-dev -COPY dist/*.whl /app/ + +RUN adduser worker +USER worker +WORKDIR /home/worker + +COPY --chown=worker:worker dist/*.whl /home/worker # RUN python3 -m pip install ".[plotting-stable]" # Image is 1.6gb with plotting # The size is reduced to 847 mb without it. -RUN python3 -m pip install /app/*.whl +RUN python3 -m pip install --disable-pip-version-check --no-cache-dir --user /home/worker/*.whl +RUN ls /home/worker/.local/lib/python3.9/site-packages/alphatims/ext/timsdata.so +RUN chmod 777 /home/worker/.local/lib/python3.9/site-packages/alphatims/ext/timsdata.so + RUN python3 -m pip cache purge +ENV PATH="/home/worker/.local/bin:${PATH}" ENTRYPOINT [ "alphatims" ] diff --git a/README.md b/README.md index 9f8aa52b..c4796f46 100755 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ There are three different types of installation possible: * [**One-click GUI installer:**](#one-click-gui) Choose this installation if you only want the GUI and/or keep things as simple as possible. * [**Pip installer:**](#pip) Choose this installation if you want to use AlphaTims as a Python package in an existing Python 3.8 environment (e.g. a Jupyter notebook). If needed, the GUI and CLI can be installed with pip as well. * [**Developer installer:**](#developer) Choose this installation if you are familiar with CLI tools, [conda](https://docs.conda.io/en/latest/) and Python. This installation allows access to all available features of AlphaTims and even allows to modify its source code directly. Generally, the developer version of AlphaTims outperforms the precompiled versions which makes this the installation of choice for high-throughput experiments. +* [**Docker:**](#docker) Use this installation if you want to use a container based workflow. This is usefull to preserve a clean environment or when running multiple tools that might have conflicting dependencies. ***IMPORTANT: While AlphaTims is mostly platform independent, some calibration functions require [Bruker libraries](alphatims/ext) which are only available on Windows and Linux.*** @@ -179,6 +180,14 @@ The following steps are optional, but make working with AlphaTims slightly more When `zsh` is the default terminal instead of `bash`, replace `~/.bashrc` with `~/.zshrc`. On Windows, the command `where alphatims` can be used to find the location of the binary executable. This path can then be (permanently) added to Windows' path variable. * When using Jupyter notebooks and multiple conda environments direcly from the terminal, it is recommended to `conda install nb_conda_kernels` in the conda base environment. Hereafter, running a `jupyter notebook` from the conda base environment should have a `python [conda env: alphatims]` kernel available, in addition to all other conda kernels in which the command `conda install ipykernel` was run. +### Docker + +(WIP) + +```shell +docker pull ghcr://MannLabs/alphatims:latest +``` + ### Installation issues See the general [troubleshooting](#troubleshooting) section. diff --git a/alphatims/utils.py b/alphatims/utils.py index 1b2e5314..34e01460 100755 --- a/alphatims/utils.py +++ b/alphatims/utils.py @@ -164,8 +164,10 @@ def show_platform_info() -> None: ) # check if architecture is arm64 as psutil.cpu_freq() is not yet supported on apple silicon - if platform.machine() != 'arm64': + try: logging.info(f"cpu frequency - {psutil.cpu_freq().current:.2f} Mhz") + except AttributeError: + logging.info("Unable to log cpu frequency") logging.info( f"ram - " f"{psutil.virtual_memory().available/1024**3:.1f}/" From 439c3505edeb0a1ac0306a8d2abb77510c563185 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Sun, 28 May 2023 19:26:29 +0200 Subject: [PATCH 06/11] FEAT: hdf spectra export --- alphatims/bruker.py | 133 ++++++++++++++++++++++++++++++++++---------- alphatims/cli.py | 38 ++++++++++++- 2 files changed, 139 insertions(+), 32 deletions(-) diff --git a/alphatims/bruker.py b/alphatims/bruker.py index cb15230f..a2113d95 100644 --- a/alphatims/bruker.py +++ b/alphatims/bruker.py @@ -2058,22 +2058,23 @@ def index_precursors( trimmed_spectrum_intensity_values ) - def save_as_mgf( + def save_as_spectra( self, directory: str, file_name: str, overwrite: bool = False, centroiding_window: int = 5, keep_n_most_abundant_peaks: int = -1, + mgf: bool = True ): - """Save profile spectra from this TimsTOF object as an mgf file. + """Save profile spectra from this TimsTOF object as an spectrum file. Parameters ---------- directory : str - The directory where to save the mgf file. + The directory where to save the spectrum file. file_name : str - The file name of the mgf file. + The file name of the spectrum file. overwrite : bool If True, an existing file is truncated. If False, nothing happens if a file already exists. @@ -2090,7 +2091,7 @@ def save_as_mgf( Returns ------- str - The full file name of the mgf file. + The full file name of the spectrum file. """ full_file_name = os.path.join( directory, @@ -2127,30 +2128,36 @@ def save_as_mgf( mobilities = self.mobility_values[ self.precursors.ScanNumber.values.astype(np.int64) ] - with open(full_file_name, "w") as infile: - logging.info(f"Exporting profile spectra to {full_file_name}...") - for index in alphatims.utils.progress_callback( - range(1, self.precursor_max_index) - ): - start = spectrum_indptr[index] - end = spectrum_indptr[index + 1] - title = ( - f"index: {index}, " - f"intensity: {intensities[index - 1]:.1f}, " - f"mobility: {mobilities[index - 1]:.3f}, " - f"average_mz: {average_mzs[index - 1]:.3f}" - ) - infile.write("BEGIN IONS\n") - infile.write(f'TITLE="{title}"\n') - infile.write(f"PEPMASS={mono_mzs[index - 1]:.6f}\n") - infile.write(f"CHARGE={charges[index - 1]}\n") - infile.write(f"RTINSECONDS={rtinseconds[index - 1]:.2f}\n") - for mz, intensity in zip( - self.mz_values[spectrum_tof_indices[start: end]], - spectrum_intensity_values[start: end], - ): - infile.write(f"{mz:.6f} {intensity}\n") - infile.write("END IONS\n") + logging.info(f"Exporting profile spectra to {full_file_name}...") + if mgf: + save_as_mgf( + full_file_name, + spectrum_indptr, + intensities, + mobilities, + average_mzs, + mono_mzs, + charges, + rtinseconds, + spectrum_tof_indices, + spectrum_intensity_values, + self.precursor_max_index, + self.mz_values, + ) + else: + save_as_spectra( + full_file_name, + spectrum_indptr, + intensities, + mobilities, + average_mzs, + mono_mzs, + charges, + rtinseconds, + spectrum_tof_indices, + spectrum_intensity_values, + self.mz_values, + ) logging.info( f"Succesfully wrote {self.precursor_max_index - 1:,} " f"spectra to {full_file_name}." @@ -2326,7 +2333,7 @@ class PrecursorFloatError(TypeError): @alphatims.utils.pjit( - signature_or_function="void(i8,i8[:],i8[:],i8[:],u4[:],u2[:],u4[:],f8[:],i8[:],i8[:])" + # signature_or_function="void(i8,i8[:],i8[:],i8[:],u4[:],u2[:],u4[:],f8[:],i8[:],i8[:])" ) def set_precursor( precursor_index: int, @@ -3291,3 +3298,69 @@ def filter_tof_to_csr( tof_value = tof_indices[idx] indptr.append(len(values)) return np.array(indptr), np.array(values), np.array(columns) + + +def save_as_mgf( + full_file_name, + spectrum_indptr, + intensities, + mobilities, + average_mzs, + mono_mzs, + charges, + rtinseconds, + spectrum_tof_indices, + spectrum_intensity_values, + precursor_max_index, + mz_values, +): + with open(full_file_name, "w") as infile: + for index in alphatims.utils.progress_callback( + range(1, precursor_max_index) + ): + start = spectrum_indptr[index] + end = spectrum_indptr[index + 1] + title = ( + f"index: {index}, " + f"intensity: {intensities[index - 1]:.1f}, " + f"mobility: {mobilities[index - 1]:.3f}, " + f"average_mz: {average_mzs[index - 1]:.3f}" + ) + infile.write("BEGIN IONS\n") + infile.write(f'TITLE="{title}"\n') + infile.write(f"PEPMASS={mono_mzs[index - 1]:.6f}\n") + infile.write(f"CHARGE={charges[index - 1]}\n") + infile.write(f"RTINSECONDS={rtinseconds[index - 1]:.2f}\n") + for mz, intensity in zip( + mz_values[spectrum_tof_indices[start: end]], + spectrum_intensity_values[start: end], + ): + infile.write(f"{mz:.6f} {intensity}\n") + infile.write("END IONS\n") + + +def save_as_spectra( + full_file_name, + spectrum_indptr, + intensities, + mobilities, + average_mzs, + mono_mzs, + charges, + rtinseconds, + spectrum_tof_indices, + spectrum_intensity_values, + mz_values, +): + with h5py.File(full_file_name, "w") as infile: + infile["indptr"] = spectrum_indptr[1:] + infile["fragment_mzs"] = mz_values[ + spectrum_tof_indices + ] + infile["fragment_intensities"] = spectrum_intensity_values + infile["precursor_rt"] = rtinseconds + infile["precursor_charge"] = charges + infile["precursor_intensity"] = intensities + infile["precursor_mobility"] = mobilities + infile["precursor_average_mz"] = average_mzs + infile["precursor_monoistopic_mz"] = mono_mzs diff --git a/alphatims/cli.py b/alphatims/cli.py index a9332a68..2a10bb70 100644 --- a/alphatims/cli.py +++ b/alphatims/cli.py @@ -312,12 +312,46 @@ def export_mgf(**kwargs): directory = data.directory else: directory = parameters["output_folder"] - data.save_as_mgf( + data.save_as_spectra( overwrite=not parameters["disable_overwrite"], directory=directory, file_name=f"{data.sample_name}.mgf", centroiding_window=parameters["centroiding_window"], - keep_n_most_abundant_peaks=parameters["keep_n_most_abundant_peaks"] + keep_n_most_abundant_peaks=parameters["keep_n_most_abundant_peaks"], + mgf=True, + ) + + +@export.command( + "spectra", + help="Export BRUKER_RAW_DATA as (profile) spectra file.", + no_args_is_help=True, +) +@cli_option("bruker_raw_data", as_argument=True) +@cli_option("keep_n_most_abundant_peaks") +@cli_option("centroiding_window") +@cli_option("disable_overwrite") +@cli_option("output_folder") +@cli_option("log_file") +@cli_option("threads") +@cli_option("disable_log_stream") +@cli_option("parameter_file") +@cli_option("export_parameters") +def export_spectra(**kwargs): + with parse_cli_settings("export spectra", **kwargs) as parameters: + import alphatims.bruker + data = alphatims.bruker.TimsTOF(parameters["bruker_raw_data"]) + if "output_folder" not in parameters: + directory = data.directory + else: + directory = parameters["output_folder"] + data.save_as_spectra( + overwrite=not parameters["disable_overwrite"], + directory=directory, + file_name=f"{data.sample_name}.spectra.hdf", + centroiding_window=parameters["centroiding_window"], + keep_n_most_abundant_peaks=parameters["keep_n_most_abundant_peaks"], + mgf=False, ) From 86b575536a0e688d3d636255498f630fcb8c00bf Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Tue, 13 Jun 2023 14:06:25 +0200 Subject: [PATCH 07/11] FIX: typo in hdf export --- alphatims/bruker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alphatims/bruker.py b/alphatims/bruker.py index a2113d95..8a82ccb1 100644 --- a/alphatims/bruker.py +++ b/alphatims/bruker.py @@ -3363,4 +3363,4 @@ def save_as_spectra( infile["precursor_intensity"] = intensities infile["precursor_mobility"] = mobilities infile["precursor_average_mz"] = average_mzs - infile["precursor_monoistopic_mz"] = mono_mzs + infile["precursor_monoisotopic_mz"] = mono_mzs From bdca2a65a4d39b8344faae5a556dd9cf400ee85d Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Tue, 18 Jul 2023 10:21:35 +0200 Subject: [PATCH 08/11] FIX: numpy int --- alphatims/bruker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alphatims/bruker.py b/alphatims/bruker.py index 8a82ccb1..8fb4e945 100644 --- a/alphatims/bruker.py +++ b/alphatims/bruker.py @@ -1982,7 +1982,7 @@ def index_precursors( precursor_offsets[-1] = len(precursor_order) offset = precursor_offsets[1] offsets = precursor_order[offset:] - counts = np.empty(len(offsets) + 1, dtype=np.int) + counts = np.empty(len(offsets) + 1, dtype=np.int64) counts[0] = 0 counts[1:] = np.cumsum( self.quad_indptr[offsets + 1] - self.quad_indptr[offsets] From 4f8d4392f79c47b0a21901a9970099d1ac29c7d8 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Tue, 18 Jul 2023 10:28:30 +0200 Subject: [PATCH 09/11] =?UTF-8?q?Bump=20version:=201.0.7=20=E2=86=92=201.0?= =?UTF-8?q?.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alphatims/__init__.py | 2 +- misc/bumpversion.cfg | 2 +- misc/one_click_linux/control | 2 +- misc/one_click_linux/create_installer_linux.sh | 2 +- misc/one_click_macos/Info.plist | 4 ++-- misc/one_click_macos/create_installer_macos.sh | 6 +++--- misc/one_click_macos/distribution.xml | 2 +- misc/one_click_windows/alphatims_innoinstaller.iss | 2 +- misc/one_click_windows/create_installer_windows.bat | 2 +- misc/one_click_windows/create_installer_windows.sh | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/alphatims/__init__.py b/alphatims/__init__.py index 944df9fb..5b0ca225 100755 --- a/alphatims/__init__.py +++ b/alphatims/__init__.py @@ -2,7 +2,7 @@ __project__ = "alphatims" -__version__ = "1.0.7" +__version__ = "1.0.8" __license__ = "Apache" __description__ = "A Python package to index Bruker TimsTOF raw data for fast and easy accession and visualization" __author__ = "Sander Willems, Eugenia Voytik" diff --git a/misc/bumpversion.cfg b/misc/bumpversion.cfg index 1ae7d6e6..bf2281ed 100644 --- a/misc/bumpversion.cfg +++ b/misc/bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.7 +current_version = 1.0.8 commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? diff --git a/misc/one_click_linux/control b/misc/one_click_linux/control index 9fec6886..59072d1c 100644 --- a/misc/one_click_linux/control +++ b/misc/one_click_linux/control @@ -1,5 +1,5 @@ Package: AlphaTims -Version: 1.0.7 +Version: 1.0.8 Architecture: all Maintainer: Mann Labs Description: AlphaTims GUI diff --git a/misc/one_click_linux/create_installer_linux.sh b/misc/one_click_linux/create_installer_linux.sh index 881b8215..2b22fd2f 100644 --- a/misc/one_click_linux/create_installer_linux.sh +++ b/misc/one_click_linux/create_installer_linux.sh @@ -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-1.0.7-py3-none-any.whl[plotting-stable,stable,legacy-stable]" +pip install "../../dist/alphatims-1.0.8-py3-none-any.whl[plotting-stable,stable,legacy-stable]" pip install pyinstaller==5.6.2 pyinstaller ../pyinstaller/alphatims.spec -y conda deactivate diff --git a/misc/one_click_macos/Info.plist b/misc/one_click_macos/Info.plist index 26971cec..b957549d 100644 --- a/misc/one_click_macos/Info.plist +++ b/misc/one_click_macos/Info.plist @@ -9,9 +9,9 @@ CFBundleIconFile alpha_logo.icns CFBundleIdentifier - alphatims.1.0.7 + alphatims.1.0.8 CFBundleShortVersionString - 1.0.7 + 1.0.8 CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/misc/one_click_macos/create_installer_macos.sh b/misc/one_click_macos/create_installer_macos.sh index 6e4615b7..90af2769 100644 --- a/misc/one_click_macos/create_installer_macos.sh +++ b/misc/one_click_macos/create_installer_macos.sh @@ -17,7 +17,7 @@ rm -rf build python setup.py sdist bdist_wheel cd misc/one_click_macos pip install pyinstaller==5.6.2 -pip install "../../dist/alphatims-1.0.7-py3-none-any.whl[plotting-stable,stable,legacy-stable]" +pip install "../../dist/alphatims-1.0.8-py3-none-any.whl[plotting-stable,stable,legacy-stable]" conda list pyinstaller ../pyinstaller/alphatims.spec -y conda deactivate @@ -34,7 +34,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 1.0.7 --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 1.0.8 --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 "willems@biochem.mpg.de" --password "@keychain:Alphatims-develop" --asc-provider 7QSY5527AQ --file dist/alphatims_gui_installer_macos.pkg 2>&1 | awk '/RequestUUID/ { print $NF; }') request_status="in progress" @@ -46,6 +46,6 @@ if false; then xcrun altool --notarization-info "$requestUUID" --username "willems@biochem.mpg.de" --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 1.0.7 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg + pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 1.0.8 --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 diff --git a/misc/one_click_macos/distribution.xml b/misc/one_click_macos/distribution.xml index 96fba2e2..61cc7acf 100755 --- a/misc/one_click_macos/distribution.xml +++ b/misc/one_click_macos/distribution.xml @@ -1,6 +1,6 @@ - AlphaTims 1.0.7 + AlphaTims 1.0.8 diff --git a/misc/one_click_windows/alphatims_innoinstaller.iss b/misc/one_click_windows/alphatims_innoinstaller.iss index bd238756..292f0a53 100644 --- a/misc/one_click_windows/alphatims_innoinstaller.iss +++ b/misc/one_click_windows/alphatims_innoinstaller.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "AlphaTims" -#define MyAppVersion "1.0.7" +#define MyAppVersion "1.0.8" #define MyAppPublisher "Max Planck Institute of Biochemistry, Mann department" #define MyAppURL "https://github.com/MannLabs/alphatims" #define MyAppExeName "alphatims_gui.exe" diff --git a/misc/one_click_windows/create_installer_windows.bat b/misc/one_click_windows/create_installer_windows.bat index 4b26db9b..2cc91133 100644 --- a/misc/one_click_windows/create_installer_windows.bat +++ b/misc/one_click_windows/create_installer_windows.bat @@ -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-1.0.7-py3-none-any.whl[plotting-stable,stable,legacy-stable]" +call pip install "../../dist/alphatims-1.0.8-py3-none-any.whl[plotting-stable,stable,legacy-stable]" call pip install pyinstaller==4.10 call pyinstaller ../pyinstaller/alphatims.spec -y call conda deactivate diff --git a/misc/one_click_windows/create_installer_windows.sh b/misc/one_click_windows/create_installer_windows.sh index 8e2405ed..ed69f9e4 100644 --- a/misc/one_click_windows/create_installer_windows.sh +++ b/misc/one_click_windows/create_installer_windows.sh @@ -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-1.0.7-py3-none-any.whl[plotting-stable,stable,legacy-stable]" +pip install "../../dist/alphatims-1.0.8-py3-none-any.whl[plotting-stable,stable,legacy-stable]" pip install pyinstaller==5.6.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 From 23d49c4f09cb2f7ab8bd27770e9b955e040ac158 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Tue, 18 Jul 2023 10:49:54 +0200 Subject: [PATCH 10/11] CHORE: added bugfix for missing libgomp on linux --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f8aa52b..35039bd2 100755 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ AlphaTims is an open-source Python package that provides fast accession and visu * [**Installation issues**](#installation-issues) * [**Test data**](#test-data) * [**Test sample**](#test-sample) - * [**LC**](#lc) + * [**LC**](#lc) * [**DDA**](#dda) * [**DIA**](#dia) * [**Usage**](#usage) @@ -318,6 +318,7 @@ Common installation/usage issues include: * **GUI does not open.** In some cases this can be simply because of using an incompatible (default) browser. AlphaTims has been tested with Google Chrome and Mozilla Firefox. Windows IE and Windows Edge compatibility is not guaranteed. * **When older Bruker files need to be processed as well,** the [legacy dependencies](requirements/requirements_legacy.txt) are also needed. However, note that this requires [Microsoft Visual C++](https://visualstudio.microsoft.com/visual-cpp-build-tools) to be manually installed (on Windows machines) prior to AlphaTims installation! To include the legacy dependencies, install AlphaTims with `pip install "alphatims[legacy]"` or `pip install "alphatims[legacy]" --upgrade` if already pre-installed. * **When installed through `pip`, the GUI cannot be started.** Make sure you install AlphaTims with `pip install "alphatims[plotting-stable]"` to include the GUI with stable dependancies. If this was done and it still fails to run the GUI, a possible fix might be to run `pip install panel==0.10.3` after AlphaTims was installed. +* **Some external libraries are missing.** On some OS, there might be libraries missing. As an exmaple, the following error message might pop up: `OSError: libgomp.so.1: cannot open shared object file: No such file or directory`. This can be solved by installing those manually, e.g. on Linux: `apt-get install libgomp1`. --- ## How it works From 21134d187b1e25a99df3ed3d5ffcd95447ce7420 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Tue, 18 Jul 2023 11:54:14 +0200 Subject: [PATCH 11/11] CHORE: removed unused cla assistant --- .github/workflows/cla_assistant.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/cla_assistant.yml diff --git a/.github/workflows/cla_assistant.yml b/.github/workflows/cla_assistant.yml deleted file mode 100644 index d576e201..00000000 --- a/.github/workflows/cla_assistant.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "CLA Assistant" -on: - # issue_comment: - # types: [created] - # pull_request: - # types: [opened,closed,synchronize] - workflow_dispatch: - -jobs: - CLAssistant: - runs-on: ubuntu-latest - steps: - - name: "CLA Assistant" - if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request' - # Alpha Release - uses: cla-assistant/github-action@v2.0.3-alpha - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_ACCESS_ALPHATIMS }} - with: - path-to-signatures: 'signatures/version1/cla.json' - path-to-document: 'https://github.com/MannLabs/alphatims/blob/master/misc/CLA.md' - # branch should not be protected - branch: 'cla' - allowlist: swillems, EugeniaVoytik, straussmaximilian, bot*