isograph.io.artifacts
Dataset artifact I/O.
- class isograph.io.artifacts.DatasetBundle(manifest, sample_table, feature_tables, matrices, truth_tables)
- Parameters:
manifest (DatasetManifest)
sample_table (DataFrame)
feature_tables (dict[str, DataFrame])
matrices (dict[str, ndarray])
truth_tables (dict[str, DataFrame])
-
manifest:
DatasetManifest
-
sample_table:
DataFrame
-
feature_tables:
dict[str,DataFrame]
-
matrices:
dict[str,ndarray]
-
truth_tables:
dict[str,DataFrame]
- isograph.io.artifacts.save_dense_matrix(path, matrix)
- Return type:
None- Parameters:
path (Path)
matrix (ndarray)
- isograph.io.artifacts.load_dense_matrix(path)
- Return type:
ndarray- Parameters:
path (Path)
- isograph.io.artifacts.save_dataset_bundle(bundle, output_dir)
- Return type:
Path- Parameters:
bundle (DatasetBundle)
output_dir (Path)
- isograph.io.artifacts.load_dataset_bundle(dataset_dir)
- Return type:
- Parameters:
dataset_dir (Path)
- isograph.io.artifacts.describe_dataset(dataset_dir)
- Return type:
- Parameters:
dataset_dir (Path)
- isograph.io.artifacts.validate_bundle_inputs(sample_table, transcript_table, transcript_counts, gene_table=None, gene_counts=None)
Validate raw inputs before building a dataset bundle.
Checks alignment rules, required columns, and data integrity. Raises
ValueErrorlisting all violations found (not just the first).- Parameters:
sample_table (
DataFrame) – One row per sample. Must containsample_id. Column order must match the column order of every matrix.transcript_table (
DataFrame) – One row per transcript. Must containtranscript_idandgene_id. Row order must match the row order oftranscript_counts.transcript_counts (
ndarray) – Dense count matrix of shape(n_transcripts, n_samples).gene_table (
DataFrame|None) – Optional. One row per gene. Must containgene_idwhen provided. Row order must match the row order ofgene_counts.gene_counts (
ndarray|None) – Optional. Dense count matrix of shape(n_genes, n_samples). Required whengene_tableis provided, and vice versa.
- Return type:
None
- isograph.io.artifacts.build_feature_spec(kind, filename, table)
- Return type:
- Parameters:
kind (str)
filename (str)
table (DataFrame)
- isograph.io.artifacts.build_matrix_spec(name, filename, matrix)
- Return type:
- Parameters:
name (str)
filename (str)
matrix (ndarray)