isograph.validation

Pydantic validation models.

class isograph.validation.MatrixSpec(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • assay_name (str)

  • filename (str)

  • n_features (int)

  • n_samples (int)

  • encoding (Literal['dense_npz'])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

assay_name: str
filename: str
n_features: int
n_samples: int
encoding: Literal['dense_npz']
class isograph.validation.FeatureTableSpec(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • kind (Literal['gene', 'transcript', 'psi', 'junction', 'truth_module', 'truth_switch', 'truth_abundance', 'truth_channel_role'])

  • filename (str)

  • n_rows (int)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

kind: Literal['gene', 'transcript', 'psi', 'junction', 'truth_module', 'truth_switch', 'truth_abundance', 'truth_channel_role']
filename: str
n_rows: int
class isograph.validation.DatasetManifest(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • dataset_name (str)

  • suite_name (str)

  • description (str)

  • sample_table (str)

  • feature_tables (list[FeatureTableSpec])

  • matrices (list[MatrixSpec])

  • provenance (dict[str, str])

  • truth_tables (list[str])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

dataset_name: str
suite_name: str
description: str
sample_table: str
feature_tables: list[FeatureTableSpec]
matrices: list[MatrixSpec]
provenance: dict[str, str]
truth_tables: list[str]
validate_tables()
Return type:

DatasetManifest

class isograph.validation.AssayBundle(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • sample_table (str)

  • gene_table (str)

  • matrix (str)

  • n_samples (int)

  • n_features (int)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

sample_table: str
gene_table: str
matrix: str
n_samples: int
n_features: int
class isograph.validation.FreezeSelectionConfig(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • gene_panel_size (int | None)

  • allowed_diagnoses (list[str])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

gene_panel_size: int | None
allowed_diagnoses: list[str]
classmethod diagnoses_must_not_be_empty(value)
Return type:

list[str]

Parameters:

value (list[str])

class isograph.validation.LoadedDataset(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • manifest_path (Path)

  • n_samples (int)

  • n_genes (int)

  • available_assays (list[str])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

manifest_path: Path
n_samples: int
n_genes: int
available_assays: list[str]
assays_present()
Return type:

LoadedDataset