From 00a324219d2039efe9ffa8a01e888885d5c93d1c Mon Sep 17 00:00:00 2001 From: Anton Rau Date: Mon, 1 Feb 2021 11:09:46 +0100 Subject: [PATCH] Proper parsing of invalid MCD files when some acquisitions offset are outside the file's size. --- CHANGELOG.md | 3 +++ README.md | 2 +- docs/index.html | 4 ++-- docs/io/mcd/mcdparser.html | 6 +++--- imctools/__init__.py | 2 +- imctools/io/mcd/mcdparser.py | 2 +- pyproject.toml | 2 +- setup.cfg | 2 +- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87fbd6e..3bb825e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.4] - 2021-02-01 +- Proper parsing of invalid MCD files when some acquisitions offset are outside the file's size + ## [2.1.3] - 2021-01-21 - Option to force usage of TXT files in `mcdfolder_to_imcfolder` when dealing with partially corrupted MCD files diff --git a/README.md b/README.md index 3df4167..f43356a 100755 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Version 1.x documentation (deprecated): https://imctools.readthedocs.io Preferable way to install `imctools` is via official PyPI registry. Please define package version explicitly in order to avoid incompatibilities between v1.x and v2.x versions: ``` -pip install imctools==2.1.3 +pip install imctools==2.1.4 ``` In old IMC segmentation pipelines versions 1.x should be used! ``` diff --git a/docs/index.html b/docs/index.html index b8eb221..b7f0165 100644 --- a/docs/index.html +++ b/docs/index.html @@ -49,7 +49,7 @@

Prerequisites

Installation

Preferable way to install imctools is via official PyPI registry. Please define package version explicitly in order to avoid incompatibilities between v1.x and v2.x versions:

-
pip install imctools==2.1.3
+
pip install imctools==2.1.4
 

In old IMC segmentation pipelines versions 1.x should be used!

pip install imctools==1.0.8
@@ -140,7 +140,7 @@ 

Usage of previous version 1.x

__author__ = """Vito Zanotelli, Anton Rau""" __email__ = "vito.zanotelli@uzh.ch, anton.rau@uzh.ch" -__version__ = "2.1.3"
+__version__ = "2.1.4"
diff --git a/docs/io/mcd/mcdparser.html b/docs/io/mcd/mcdparser.html index 5624b69..390b262 100644 --- a/docs/io/mcd/mcdparser.html +++ b/docs/io/mcd/mcdparser.html @@ -88,8 +88,8 @@

Module imctools.io.mcd.mcdparser

acquisition = self.session.acquisitions.get(acquisition_id) if acquisition is None: return None - data = self._get_acquisition_raw_data(acquisition) try: + data = self._get_acquisition_raw_data(acquisition) image_data = reshape_long_2_cyx(data, is_sorted=True) # Drop first three channels X, Y, Z image_data = image_data[3:] @@ -392,8 +392,8 @@

Classes

acquisition = self.session.acquisitions.get(acquisition_id) if acquisition is None: return None - data = self._get_acquisition_raw_data(acquisition) try: + data = self._get_acquisition_raw_data(acquisition) image_data = reshape_long_2_cyx(data, is_sorted=True) # Drop first three channels X, Y, Z image_data = image_data[3:] @@ -692,8 +692,8 @@

Methods

acquisition = self.session.acquisitions.get(acquisition_id) if acquisition is None: return None - data = self._get_acquisition_raw_data(acquisition) try: + data = self._get_acquisition_raw_data(acquisition) image_data = reshape_long_2_cyx(data, is_sorted=True) # Drop first three channels X, Y, Z image_data = image_data[3:] diff --git a/imctools/__init__.py b/imctools/__init__.py index dfc153f..0f3f972 100644 --- a/imctools/__init__.py +++ b/imctools/__init__.py @@ -6,4 +6,4 @@ __author__ = """Vito Zanotelli, Anton Rau""" __email__ = "vito.zanotelli@uzh.ch, anton.rau@uzh.ch" -__version__ = "2.1.3" +__version__ = "2.1.4" diff --git a/imctools/io/mcd/mcdparser.py b/imctools/io/mcd/mcdparser.py index 8e6c4e0..33b66e3 100644 --- a/imctools/io/mcd/mcdparser.py +++ b/imctools/io/mcd/mcdparser.py @@ -60,8 +60,8 @@ def get_acquisition_data(self, acquisition_id: int): acquisition = self.session.acquisitions.get(acquisition_id) if acquisition is None: return None - data = self._get_acquisition_raw_data(acquisition) try: + data = self._get_acquisition_raw_data(acquisition) image_data = reshape_long_2_cyx(data, is_sorted=True) # Drop first three channels X, Y, Z image_data = image_data[3:] diff --git a/pyproject.toml b/pyproject.toml index 6fdaab5..9258174 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "imctools" -version = "2.1.3" +version = "2.1.4" description = "Tools to handle Fluidigm IMC data" license = "MIT" authors = ["Vito Zanotelli ", "Anton Rau "] diff --git a/setup.cfg b/setup.cfg index 67c016c..483ed9e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.1.3 +current_version = 2.1.4 commit = False tag = False