Trans mapping¤
jaxqtl supports trans-eQTL mapping by streaming genotype variants in chunks and testing each variant against many
phenotypes.
Chunked scanning¤
Trans scans can be large (millions of variants times thousands of phenotypes). jaxqtl supports streaming:
- iterate over genotype blocks of size
chunk_size - compute association statistics for all phenotypes in each block
- write or post-process block outputs incrementally
Mapping and output schemas¤
jaxqtl.map.map_trans(data: ReadyDataState, test: AbstractHypothesisTest, chunk_size: int = 5000, verbose: bool = True, log: logging.Logger | None = None, seed: int = 123) -> collections.abc.Iterator[tuple[polars.dataframe.frame.DataFrame, polars.dataframe.frame.DataFrame]]
¤
Perform trans-eQTL mapping in genotype chunks and stream results.
Phenotypes with zero or NaN variance are excluded before mapping.
Arguments:
data: Genotype/expression/covariate bundle aligned on IID.test: Hypothesis test to apply per variant (score or Wald).chunk_size: Number of variants per block to stream from genotype storage.verbose: Whether to emit progress logging.log: Optional logger to use; defaults to module logger.seed: Reserved for future stochastic operations. It does not affect current trans results.
Returns:
An iterator of (variant_df, sumstat_df) pairs. variant_df contains one row
per variant in the block. sumstat_df contains the phenotype-by-variant
association results, ordered by phenotype and then variant.
Failure Modes:
If no phenotype has nonzero, non-NaN variance, the iterator yields no results and logs a warning.
jaxqtl.map.get_trans_schemas() -> tuple[dict[str, type], dict[str, type]]
¤
Return column schemas for trans mapping outputs.
Returns:
A tuple (variant_schema, sumstat_schema). The variant schema contains chrom,
snp, pos, a1, a0, af, and ma_count. The summary-stat schema contains
phenotype, snp, beta, se, pvalue, nb_alpha, and
model_converged. Non-Negative-Binomial scans omit nb_alpha from emitted
summary-stat frames.