Skip to content

0.0.9

Choose a tag to compare

@jaydu1 jaydu1 released this 30 Jul 04:53
· 69 commits to main since this release
a696978
  • License change – crispyx 0.0.9 and later is distributed under a Modified
    MIT License, which adds two attribution conditions for commercial use. All MIT
    freedoms are retained and no fee or royalty is imposed. Versions up to and
    including 0.0.8 remain under the unmodified MIT License; that grant is
    perpetual and is not withdrawn. See LICENSE for the terms.

  • Unified normalized effects – compute_normalized_effects /
    cx.pb.normalized_effects replaces the two earlier one-command estimators with a
    single function selected by method. method="mean_log1p" averages per-cell
    log1p values (mean of logs); method="log_mean" averages normalised counts and
    then applies log1p(baseline_count * mean) (log of mean). Both normalise library
    size themselves, and both return the effect in X with
    layers['perturbation_profile'], plus
    layers['control_profile_matched'] when batch_column is given, so that
    X == perturbation_profile - control_profile_matched exactly. Supplying
    batch_column is itself the request for batch correction; there is no flag.

    compute_average_log_expression and compute_pseudobulk_expression remain as
    deprecated aliases with their original layer and uns names, and now emit a
    DeprecationWarning. They will be removed in 0.1.0.

    Note that cx.pb.effects deliberately does not normalise: it computes a contrast
    on whatever scale its input already carries. Normalise beforehand with
    cx.pp.normalize_total_log1p, or use cx.pb.normalized_effects to have it done in
    one pass.

  • Generic streaming batch statistics – batch_process /
    cx.tl.batch_process applies a user-supplied mergeable reducer within
    experimental batches without loading the complete cell-by-gene matrix. A
    BatchReducer provides initialize / update / finalize callbacks
    for per-group statistics, plus an optional compare callback for
    group-versus-reference contrasts in mode="comparison". Finalized batch
    statistics are combined as sum(weight * values) / sum(weight), and only
    batches containing both the group and the reference contribute to a contrast.
    Argument names follow the differential-expression API (groupby aliases
    perturbation_column; reference aliases control_label). Cached
    results are keyed on the input path and modification time, so regenerating a
    source file invalidates its cached statistic; force=True remains necessary
    when a reducer's implementation changes without changing statistic_name.

  • Batch-level absolute pseudo-bulk profiles – aggregate_pseudobulk /
    cx.pb.aggregate groups by one or more observation columns and retains one
    profile for every observed combination. It supports strict raw-count sums,
    mean log1p expression, a five-cell default threshold, deterministic
    one-resample bootstrapping, source-layer selection, and versioned provenance
    metadata. perturbations keeps a profile when any of its grouping values
    matches, so it selects on whichever column holds the labels regardless of its
    position in groupby and preserves every combination of the others.

  • Explicit pseudo-bulk effects – compute_pseudobulk_effects /
    cx.pb.effects consumes a saved crispyx pseudo-bulk artifact directly or
    aggregates cell-level input first. It returns within-batch target-minus-
    reference effects by default and can explicitly combine batches using the
    existing harmonic-count weighting.

  • Tuple-level differential-expression results were intentionally not added;
    wilcoxon_test(batch_column=...) remains the batch-stratified test over all
    cells and batches.