Changelog
Source:NEWS.md
srtdisk 0.3.1
Release Date: 2026-02-25
Bug Fixes
- Fixed CSR sparse matrix loading failure in
ReadSparseMatrix()that caused'dims' must contain all (i,j) pairserrors when loading large h5ad-converted h5Seurat files. Thedimsargument toMatrix::sparseMatrix()was incorrectly swapped as(ncols, nrows)instead of(nrows, ncols), and the unnecessary transpose has been removed. - Added direct h5ad-to-RDS conversion path in
Convert()so thatConvert("file.h5ad", dest = "file.rds")works without a manual intermediate h5Seurat step.
Validated on mouse atlas (356K cells, 16.8K genes) and human atlas (1.04M cells, 17.1K genes).
srtdisk 0.3.0
Release Date: 2026-02-09
Highlights
MuData (h5mu) Multimodal Support
srtdisk now supports the MuData/h5mu format for multimodal single-cell data:
-
LoadH5MU(): Load h5mu files as multimodal Seurat objects with automatic modality-to-assay name mapping (rna->RNA, prot->ADT, atac->ATAC, etc.) -
SaveH5MU(): Export multimodal Seurat objects to h5mu format with spatial data preservation and conflict-free modality naming -
as.h5mu(): Convenience alias for SaveH5MU -
H5MU conversion pathways:
Convert()now supports h5mu as both source and destination format (h5mu<->h5Seurat, h5mu->h5ad) - Requires
MuDataSeuratpackage (optional dependency)
Direct h5ad Loading with LoadH5AD()
New LoadH5AD() function provides direct h5ad-to-Seurat conversion without the intermediate h5Seurat step:
- Reads sparse (CSR) and dense expression matrices
- Preserves categorical metadata as R factors
- Restores dimensional reductions (PCA, UMAP, tSNE)
- Handles feature metadata, neighbor graphs, and spatial data
- Supports raw counts from
raw/Xand additional layers
New Vignettes
-
Direct H5AD Loading (
direct-h5ad-loading): ShowcasesLoadH5AD()with real data from CellxGene and SeuratData -
Multimodal H5MU (
multimodal-h5mu): DemonstratesLoadH5MU()/SaveH5MU()round-trip with CITE-seq data
New Internal Utilities
-
SafeSetLayerData(): Safe V5-compatible layer data assignment with fallback -
load_spatial_demo_data(),create_synthetic_spatial(),test_spatial_roundtrip(): Spatial demo/testing utilities (internal)
Code Simplification
- Removed unused
UtilsSparseMatrix.R(ReadSparseMatrixDims,ValidateSparseMatrixDims,CreateSparseMatrixSafe) - Removed unused
GetSeuratSlotMapping()andValidateSlotMapping()from V5Compatibility.R - Removed fragile
PatchH5DMethods()monkey-patching of hdf5r’s H5D[method - Fixed
GetScaleFactors()to extract actual Visium scale factors viascalefactors()instead of returning hardcoded values
Preserved from v0.2.2
All v0.2.2 improvements are preserved in this release: - Unified Convert() interface accepting Seurat objects directly - Exported SeuratToH5AD() convenience function - Column name sanitization (SanitizeColumnName/SanitizeColumnNames) - Correct categorical encoding (no +1L regression) - Nullable dtype handling (FlattenNullable) - Variable features writing in V5 compatibility layer - standardize parameter for scanpy-compatible naming
srtdisk 0.2.2
Release Date: 2026-02-06
Highlights
Unified Convert() Interface for Seurat Objects
Convert() now accepts Seurat objects directly as the source argument, enabling one-step conversion to any supported format:
Convert(seurat_obj, dest = "output.h5ad") # Seurat -> h5ad
Convert(seurat_obj, dest = "output.loom") # Seurat -> Loom
Convert(seurat_obj, dest = "output.h5Seurat") # Seurat -> h5SeuratThis eliminates the need for the two-step SaveH5Seurat() + Convert() workflow when starting from a Seurat object.
Exported SeuratToH5AD()
SeuratToH5AD() is now a fully exported convenience function (previously @keywords internal). It delegates to Convert.Seurat internally and remains the simplest way to convert a Seurat object to h5ad format.
Bug Fixes
- Fixed
var/Xdimension mismatch in h5Seurat to h5ad conversion:varnow uses the actualXmatrix dimensions instead of metadata feature counts, which could differ when features were filtered from data layers but not from metadata - Fixed
raw/vardimension mismatch withraw/Xusing the same approach - Fixed
roxygen2::roxygenize()failure caused by a plainIsFactor()function inReadH5.Roverriding the S4 generic fromTestObject.R
srtdisk 0.2.1
Release Date: 2026-02-05
Highlights
Correct Gene Set in h5Seurat to h5ad Conversion
Fixed a critical issue where scale.data (containing only ~2,000 variable features) was prioritized as X during h5Seurat to h5ad conversion, causing var to contain only variable genes instead of the full gene set. The conversion now correctly uses data (normalized, all genes) as X and counts as raw/X, matching standard AnnData conventions. scale.data is only used as a last-resort fallback.
| Seurat | h5ad | Notes |
|---|---|---|
data (normalized) |
X |
All genes |
counts (raw) |
raw/X |
All genes |
scale.data |
(skipped) | Can be recomputed with sc.pp.scale()
|
| variable features | var['highly_variable'] |
Boolean column marking ~2,000 genes |
Native AnnData Preprocessing
srtdisk now handles “messy” AnnData files natively without requiring Python preprocessing:
-
Column Name Sanitization: Automatically sanitizes obs/var column names during h5ad to h5Seurat conversion
- Replaces problematic characters (
/, spaces, commas, semicolons, colons, backslashes) with underscores - Handles duplicate names by appending
__dup1,__dup2, etc. - Ensures valid R names (prefixes with
Xif column starts with a number) - Example:
cell/type->cell_type,sample name->sample_name
- Replaces problematic characters (
-
List/Dict Column Conversion: Converts list and dict columns in compound datasets to R-compatible strings
- Simple lists converted to semicolon-delimited strings (e.g.,
["A", "B", "C"]->"A;B;C") - Complex nested structures converted to JSON strings
- Dict columns converted to JSON strings
- Simple lists converted to semicolon-delimited strings (e.g.,
-
Nullable Dtype Handling: Properly handles pandas nullable extension dtypes stored as mask+values structures
- Automatically flattens mask+values groups to simple vectors with NA values
- Preserves missing value semantics during conversion
srtdisk 0.2.0
Release Date: 2026-01-29
Highlights
Full scRNA-seq Conversion Support with Seurat v5
srtdisk now provides complete bidirectional conversion between Seurat objects and h5ad format, with full compatibility for Seurat v5’s new Assay5 architecture:
-
Seurat to h5ad: Use
SeuratToH5AD()for direct one-step conversion or the traditional two-stepSaveH5Seurat()+Convert()workflow -
h5ad to Seurat: Use
Convert()+LoadH5Seurat()to import scanpy/AnnData objects - Properly handles V5 layered data structure (counts, data, scale.data layers)
- Supports multi-assay objects (e.g., CITE-seq with RNA + ADT)
Metadata Preservation Fixes
-
Fixed categorical metadata loss: Factor/categorical variables in
obsare now correctly preserved during h5ad conversion instead of being dropped or converted to strings - Improved handling of cell-level and feature-level metadata during round-trip conversions
Spatial Data Support (Visium)
-
Seurat to h5ad: Visium spatial data conversion is fully functional
- Preserves spatial coordinates, scale factors, and tissue images
- Compatible with scanpy/squidpy spatial analysis workflows
- h5ad to Seurat: Spatial conversion fully supported
- Fixed spatial coordinate X/Y orientation for scanpy compatibility
New Features
-
SeuratToH5AD()wrapper function for convenient direct conversion - Enhanced Visium spatial data conversion with proper coordinate handling
- Support for SlideSeq and FOV-based spatial technologies (experimental)
- Improved scanpy-compatible naming conventions with
standardize = TRUE
Bug Fixes
- Fixed categorical metadata loss during h5ad conversion
- Fixed “attribute already exists” error when converting h5ad graphs to h5seurat
- Fixed
GetAssayDataCompat()andSetAssayDataCompat()to uselayerparameter (SeuratObject 5.0+ requirement) - Fixed spatial coordinate X/Y flip in h5Seurat to h5ad conversion
- Improved UMAP display in h5ad to Seurat tutorial
srtdisk 0.1.0
New Features
Direct Seurat to H5AD Conversion
- Added
SeuratToH5AD()function for direct conversion from Seurat objects to H5AD format - Automatically handles intermediate h5Seurat file creation and cleanup
- Supports all
Convert()parameters includingstandardizefor scanpy-compatible naming
Bug Fixes
- Fixed spatial coordinate X/Y flip in h5Seurat to h5ad conversion (coordinates are now correctly stored as [X, Y] for scanpy/squidpy)
- Fixed “attribute already exists” error when converting h5ad graphs to h5seurat
- Fixed
GetAssayDataCompat()andSetAssayDataCompat()to uselayerparameter (SeuratObject 5.0+ requirement) - Fixed vignette assay references (using correct RNA assay instead of non-existent SCT/Spatial)
Code Improvements
- Removed unused utility functions (
WithAssayCompat,GetSlotMapping,GetSeuratSlotMapping,ValidateSlotMapping) - Removed deprecated
SafeExistsDeprecatedfunction - Simplified verbose messaging in
AssembleObject.R - Extracted
CreateFakeCellNameshelper to reduce code duplication inConvert.R - Removed dead commented-out code
Documentation
- Updated vignettes with Python/reticulate integration for scanpy/squidpy examples
- Added conditional evaluation for Python chunks based on package availability
- Improved vignette examples with bundled test data
- Added cellxgene spatial dataset download examples
Test Infrastructure
- Simplified test suite: consolidated 4 test files into single focused
test-conversion.R - Tests now use real datasets:
- CellxGene colorectal cancer sample (935 cells) for h5ad testing
-
pbmc3k.finalfrom SeuratData for Seurat testing -
stxBrainanterior1 from SeuratData for Visium spatial testing
- Removed synthetic test data in favor of real-world datasets
- Added
UpdateSeuratObject()calls for compatibility with older SeuratData objects