Major Update - Enhanced Usability and Robustness
General Changes Across the Package
- **Enhanced progress monitoring** with new print statements.
- **Enhanced ReadMe documentation** updated with better examples and detailed usage cases.
- **Refined help commands** with clear descriptions and usage guidance.
- Help commands now link to detailed **README** on GitHub for more information.
Specific Changes
**Imc2Zarr Improvements:**
- **Optional `output_path` Argument:**
- Made the `output_path` argument optional in the main function using `click.argument`.
- **Default Output Path:**
- If `output_path` is not provided, it automatically creates the folder `<input_path>/Zarr_converted`.
**ZarrStitch Improvements:**
- **Channel Label Logic Enhancement:**
- Fixed the issue causing dimension mismatches due to inconsistent channel labels across ROIs.
- Addressed errors where empty or incorrect channel labels could disrupt the stitching process.
- **Enhanced Folder Detection:**
- Skips folders without a `mcd_schema.xml` file, improving robustness against empty or invalid folders.
- **Better ROI Anomaly Handling:**
- Maximum channels are determined by iterating through all ROIs.
- Stitching loop for ROIs now accommodates changing channel numbers for stitching.
- **Error Handling and Logging:**
- Added error logging to a file (`error_log.txt`) within the input directory.
- Continues processing remaining folders even if an error occurs, ensuring uninterrupted execution.
- **Output Messages:**
- Prints a message indicating successful stitching for each processed folder.
- Prints error messages and directs users to the log file for details when an error occurs.
**mcd_stitch Command:**
- **Optional `zarr_folder` Argument:**
- The `zarr_folder` argument is optional and aligns with changes to IMC2Zarr.
**tiff_subset Command Enhancements:**
- **Compactified Arguments and Changes:**
- `-c` now lists channels in the specified OME-TIFF file.
- `-f` filters and subsets channels (if no channel number is given, defaults to 141-193 filtering).
- `-p` enables pyramid and tiles based OME-TIFF structure.
- **Help Command:**
- Added `-h` or `--help` for displaying detailed command usage.
- Improved descriptions and usage examples in the help command output.
- **Error Handling and Logging:**
- Errors encountered during processing are logged to a file (`error_log.txt`) within the input directory.
- Continues processing remaining files even if an error occurs, ensuring uninterrupted execution.
- **Script Level Changes:**
- Removed pyramid level and tiles argument. The script now uses the default tile size of (256 by 256 pixels) and the default number of pyramid levels as 4 directly in the code.
- Improved auto channel subsetting logic; previous logic unexpectedly skipped some channels.
- `-f` is now a mandatory argument, and the script returns custom help if not specified.