data-io-loading_skill

This skill streamlines OmicVerse data loading by replacing scanpy with ov.io readers for h5ad, 10x, Visium, Nanostring, and CSV formats.
  • Python

866

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill starlitnightly/omicverse --skill data-io-loading

  • reference.md4.6 KB
  • SKILL.md8.7 KB

Overview

This skill provides OmicVerse-focused data I/O helpers for loading bulk, single-cell, and spatial RNA-seq formats. It replaces common Scanpy and pandas reads with ov.read() and ov.io.* readers that handle h5ad, 10x H5/MTX, Visium, Visium HD, Nanostring, and CSV/TSV robustly. Use these readers in OmicVerse projects to avoid format edge cases and gain spatial geometry and Rust-backend options.

How this skill works

The skill exposes a universal ov.read(path, backend='python') that auto-detects files and routes to specialized readers under ov.io and ov.io.spatial. Readers include read_h5ad, read_10x_h5, read_10x_mtx, spatial.read_visium, read_visium_hd (bin/seg variants), read_nanostring, and read_csv. Many readers auto-detect variants (10x v2/v3, Visium parquet/csv, Nanostring column variants) and provide options for images, scalefactors, segmentation polygons, and Rust-backed h5ad loading.

When to use it

  • Loading any .h5ad, .csv, .tsv, or gzipped table into an OmicVerse workflow
  • Importing 10x Genomics outputs (H5 or Matrix Market) with correct format detection
  • Loading Visium spatial experiments with images, tissue positions, and scalefactors
  • Working with Visium HD (binned outputs or cell-segmentation polygons)
  • Reading Nanostring/CosMx SMI outputs that require column-name auto-detection

Best practices

  • Always call ov.read(path) instead of sc.read or pandas.read_csv in OmicVerse projects
  • Validate input paths before calling readers (file/directory existence, expected files in Space Ranger outputs)
  • Use ov.io.read_h5ad(..., backed='r') or ov.read(..., backend='rust') for very large h5ad files and remember to close backed objects
  • Prefer gex_only=False when you need antibody or guide features from 10x H5 files
  • Install optional dependencies (geopandas, shapely) to enable polygon geometry support for Visium HD segmentation

Example use cases

  • Load a small h5ad for analysis: adata = ov.read('dataset.h5ad')
  • Import 10x HDF5 counts with antibody features: adata = ov.io.read_10x_h5('filtered_feature_bc_matrix.h5', gex_only=False)
  • Read Space Ranger Visium with images: adata = ov.io.spatial.read_visium('outs/', load_images=True)
  • Open Visium HD segmentation to get WKT polygons: adata = ov.io.read_visium_hd_seg('outs/segmented_outputs/')
  • Read Nanostring CosMx outputs with counts and metadata: ov.io.read_nanostring(path, counts_file, meta_file, fov_file=None)

FAQ

ov.read auto-detects by extension: .h5ad returns AnnData, .csv/.tsv/.txt (and gzipped variants) return pandas DataFrame; use format-specific readers for 10x/Visium/Nanostring when needed.

How do I avoid out-of-memory errors on large h5ad files?

Use backed mode via ov.io.read_h5ad(..., backed='r') or the Rust backend ov.read(..., backend='rust') and close backed objects when finished.

I get missing polygons for Visium HD segmentation—what's required?

Install geopandas and shapely (pip install geopandas shapely). Visium HD segmentation requires those libraries to parse GeoJSON polygons into WKT.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational