diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a45fea..87fbd6e 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.3] - 2021-01-21 +- Option to force usage of TXT files in `mcdfolder_to_imcfolder` when dealing with partially corrupted MCD files + ## [2.1.2] - 2021-01-21 - Prevent crash on corrupted MCD acquisitions in order to keep valid ones diff --git a/README.md b/README.md index ed8ebf8..3df4167 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.2 +pip install imctools==2.1.3 ``` In old IMC segmentation pipelines versions 1.x should be used! ``` diff --git a/docs/cli.html b/docs/cli.html index 257065d..cd50247 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -67,7 +67,7 @@
imctools.cli
imctools.cli
imctools.converters.mcdfolder2imcfolder
Module imctools.converters.mcdfolder2imcfolder
Module imctools.converters.mcdfolder2imcfolder
Module imctools.converters.mcdfolder2imcfolder
@@ -118,7 +123,7 @@ imctools.converters.mcdfolder2imcfolder
Functions
-def mcdfolder_to_imcfolder(input: Union[str, pathlib.Path], output_folder: Union[str, pathlib.Path], create_zip: bool = False)
+def mcdfolder_to_imcfolder(input: Union[str, pathlib.Path], output_folder: Union[str, pathlib.Path], create_zip: bool = False, parse_txt: bool = False)
Converts folder (or zipped folder) containing raw acquisition data (mcd and txt files) to IMC folder containing standardized files.
@@ -131,12 +136,14 @@create_zip
parse_txt
def mcdfolder_to_imcfolder(input: Union[str, Path], output_folder: Union[str, Path], create_zip: bool = False):
+def mcdfolder_to_imcfolder(input: Union[str, Path], output_folder: Union[str, Path], create_zip: bool = False, parse_txt: bool = False):
"""Converts folder (or zipped folder) containing raw acquisition data (mcd and txt files) to IMC folder containing standardized files.
Parameters
@@ -147,6 +154,8 @@ Parameters
Path to the output folder.
create_zip
Whether to create an output as .zip file.
+ parse_txt
+ Always use TXT files if present to get acquisition image data.
"""
if isinstance(input, str):
input = Path(input)
@@ -178,7 +187,7 @@ Parameters
txt_files = glob.glob(str(input_folder / f"*[0-9]{TXT_FILE_EXTENSION}"))
txt_acquisitions_map = {TxtParser.extract_acquisition_id(f): f for f in txt_files}
- imc_writer = ImcWriter(output_folder, mcd_parser, txt_acquisitions_map)
+ imc_writer = ImcWriter(output_folder, mcd_parser, txt_acquisitions_map, parse_txt)
imc_writer.write_imc_folder(create_zip=create_zip)
finally:
if mcd_parser is not None:
diff --git a/docs/index.html b/docs/index.html
index a3ab055..b8eb221 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.2
+pip install imctools==2.1.3
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.1"
+__version__ = "2.1.3"
imctools.io.imc.imcwriter
imctools.io.imc.imcwriter
imctools.io.imc.imcwriter
class ImcWriter
-(root_output_folder: Union[str, pathlib.Path], mcd_parser: McdParser, txt_acquisitions_map: Dict[int, Union[str, pathlib.Path]] = None)
+(root_output_folder: Union[str, pathlib.Path], mcd_parser: McdParser, txt_acquisitions_map: Dict[int, Union[str, pathlib.Path]] = None, parse_txt: bool = False)
Write IMC session data to IMC folder structure.
@@ -178,6 +180,7 @@