Skip to main content

IsoVita

Interpretable compositional features associated with continuous covariates.

Citation: TBD.

IsoVita learns one interpretable component balance per group, then tests its association with a continuous coordinate (time) using complementary discrete (changepoint) and continuous (spline) tests. Both use selection-aware time permutations and separate Benjamini-Hochberg correction. A group may be detected by either or both. time can represent age, exposure, pseudotime, or another continuous coordinate; negative values are supported.

Installation

Requires Python 3.10-3.12.

pip install "isovita[isoplex]"  # transcript analyses (default filtering)
# Or: pip install isovita    # prefiltered components, filtering="none"

Optional extras: isovita[adata] for AnnData input and isovita[notebook] for Jupyter. NumPy <2 and pandas <3 bounds are retained for numerical continuity and compatibility with IsoPlex. From this repository, install pip install ".[isoplex]"; for development use pip install -e ".[dev,isoplex]".

Quick start

Prepare two tables:

  • TPM: gene_id, unique transcript_id, then sample columns containing finite, nonnegative transcript TPM (or prefiltered component abundances/proportions).
  • Metadata: unique sample_id and finite numeric time, with rows in exactly the same order as the TPM sample columns.

Remove missing/empty IDs and nonfinite times before analysis. Use consistent time units.

import pandas as pd
from isovita import (
    IsoVitaConfig, PermutationInferenceConfig,
    run_isovita_pipeline, save_isovita_pipeline_outputs,
)

tpm = pd.read_csv("tpm.tsv", sep="\t")
metadata = pd.read_csv("metadata.tsv", sep="\t")
config = IsoVitaConfig(
    inference=PermutationInferenceConfig(n_permutations=5000, random_seed=17)
)
result = run_isovita_pipeline(
    tpm=tpm, metadata=metadata,
    branches=("discrete", "continuous"), config=config, n_jobs=1,
)
print(result.final_features)
save_isovita_pipeline_outputs(result, "isovita_results")

The self-contained quick-start notebook demonstrates preparation, inference, balance interpretation, plotting, and optional windows using synthetic data. Its 99 permutations are for demonstration only. After installing the notebook extra, register a kernel from the same Python environment:

python -m ipykernel install --user --name isovita --display-name "Python (IsoVita)"

For raw expression and transcript-to-gene mapping, use prepare_isovita_inputs_from_expression(..., time_col="exposure", metadata_sample_col="sample_id"). Expression has tx_id plus sample columns; the mapping has tx_id and gene_id. The function aligns samples, annotates groups, and retains negative coordinates, returning .tpm, .metadata, and .summary. prepare_isovita_inputs accepts AnnData obsm["abundance"]; see isovita-prepare --help for the preparation CLI.

Filtering and generic compositions

IsoVitaConfig(filtering="isoplex") uses the unchanged TPM eligibility screen (strictly >0.5 TPM in at least 5 samples by default), positive-total filter, and IsoPlex effective-isoform selection. Missing IsoPlex raises an installation hint.

IsoVitaConfig(filtering="none") bypasses both the TPM screen and IsoPlex. Supply appropriately prefiltered components; all are marked eligible, with no abundance cutoff. Values must be finite and nonnegative, and every group's total must be finite and positive in every sample. Groups with fewer than two components are recorded as exclude_lt2 and not tested. Zeros within valid compositions use the unchanged pseudocount. Minimum sample requirements still apply.

For compatibility, tpm, gene_id, transcript_id, and gene/isoform-oriented helper names remain: they denote abundance, group ID, and component ID in generic data. Component IDs must be globally unique. See generic_covariate.py for a synthetic exposure example demonstrating both modes. Prefiltering should not use the tested coordinate: permutations do not repeat external filtering.

The CLI prepares AnnData inputs only (it does not run inference): isovita-prepare --adata data.h5ad --metadata metadata.tsv --tx2gene mapping.csv --time-col exposure --output-dir prepared. It requires the adata extra. Apply range restrictions explicitly to metadata before preparation.

Results

Attribute Contents
balance_summary, balance_loadings Selected A/B transcript groups, PC1 loadings, and fit diagnostics.
balance_feature_matrix Genes by samples; natural-log ratio log(GM(A) / GM(B)).
discrete_trajectory_results Changepoints, effects, statistics, and p/q values.
continuous_trajectory_results Spline statistics, fit diagnostics, and p/q values.
gene_trajectory_summary, final_features Combined global evidence and ranked discoveries.

p_value is selection-aware; analytic_p_value is diagnostic only. Check tested and balance status. Significant subsets are available in the corresponding *_trajectory_candidates tables.

Optional time windows

from dataclasses import replace
from isovita import WindowConfig

window_result = run_isovita_pipeline(
    tpm=tpm, metadata=metadata,
    branches=("discrete", "continuous", "localized"),
    config=replace(config, windows=WindowConfig(edges=(20, 40, 60, 85))),
)

The localized flag runs both tests within predefined windows. Balances and component membership are determined globally; permutations shuffle times across the full cohort and relearn the balance. BH correction pools gene x window tests separately for each detector. Intervals are left-closed/right-open, except the final upper edge is included. Small or degenerate windows are untestable.

Results appear in localized_discrete_results and localized_continuous_results and their candidate tables; they do not enter final_features.

Filtering provenance is in filtering_method, filtered_expression_df, and filter_summary. In none mode, global_metrics is only the membership table (gene_id, transcript_id, effective); sample_metrics is empty. Exports include filter_summary.csv, component_membership.csv, and filtering_method.txt. IsoPlex metric CSVs are written only in IsoPlex mode. Use a fresh output directory for each run to avoid retaining files from earlier runs.

Metadata

Release files for isovita 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isovita 0.2.1
File Size Uploaded Provenance Actions
isovita-0.2.1.tar.gz 296.0 kB With provenance Details for isovita-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isovita 0.2.1
File Interpreter ABI Platform Actions
isovita-0.2.1-py3-none-any.whl Python 3 none any Details for isovita-0.2.1-py3-none-any.whl

Total release size: 339.1 kB

Release files / isovita-0.2.1.tar.gz

Download URL isovita-0.2.1.tar.gz
Size 296.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d63262a06da1e0b271038a7c9d80afd3b44d0a5e3714be53bf69141fc55d491f
BLAKE2b-256 checksum
How to use checksums
f5a53da98b8ff392f912fe50ceeddd2fe015da401d094c7cef34707069e738d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / isovita-0.2.1-py3-none-any.whl

Download URL isovita-0.2.1-py3-none-any.whl
Size 43.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a18ca626f6ad00002d4a9e75130ff03525f165d186c5c58ac971974e2968e88c
BLAKE2b-256 checksum
How to use checksums
4d7eea152afcba1ed861dbd884ff943a832c5ca44dd173a63296a1b5021ee1f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for isovita 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isovita-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page