Skip to content

edgePython 0.5.1

Latest

Choose a tag to compare

@lakigigar lakigigar released this 25 Oct 02:54
4be67c8

Bug fixes that bring edgePython closer to edgeR 5.0, and new support for kallisto and kb (kallisto | bustools) output. The default pipelines (TMM, estimate_disp, exact test, QL F-test) give the same results as 0.5.0.

Fixes:

  • edgeR 5.0 parity fixes from @saatvik-viniak (#13): TMMwsp's stable sort and inclusive trim windows; a short lib_size recycled as edgeR does; ave_log_cpm on an all-zero matrix; Yates' correction and no tolerance in binom_test; the unimodality step of WLEB's locfit.mixed trend; and q2q_nbinom in the far tails, so exact_test(dispersion=0) no longer returns p = 1 for strongly DE genes.
  • exact_test accepts a per-gene dispersion vector (array, list or pandas Series), and locfit_by_col(degree=2) raises a clear error (#13, #14).
  • dgelist_from_tximeta reads AnnData from anndata 0.13, which lists X among the layers (#15).
  • Four parity tests no longer fail on scipy ≥ 1.16 (#15).

New for kallisto and kb (#16):

  • The gene-level readers accept a path for tx2gene, such as kb ref's t2g.txt, and take gene names from it.
  • catch_kallisto and catch_kallisto_gene return each sample's run_info.json as run.info (reads processed and pseudoaligned, kallisto and index versions), and warn when samples were run with different versions.
  • read_kb reads kb count single-cell output into a sparse AnnData, with the nac workflow's mature, nascent and ambiguous matrices as layers; read_data detects kb output.
  • aggregate_tx_pvalues and lancaster give gene-level p-values from transcript-level tests by Lancaster aggregation (Yi et al. 2018), weighting transcripts as sleuth does. Genes whose transcripts switch are found as well as genes whose transcripts change together.
  • MCP server: load_kb (single cells or pseudo-bulk), aggregate_to_genes, set_sc_design(sample_covariates=...), and load_quant reading kb's t2g.txt and reporting kallisto run information.

Behaviour changes:

  • norm_lib_sizes rejects negative counts, as edgeR's normLibSizes does; calc_norm_factors still accepts them.
  • cpm_by_group on a DGEList uses its dispersion (tagwise, then trended, then common) instead of 0.05, as edgeR does.
  • The catch_* readers stop with an error when a sample's transcripts differ from the first sample's. Such samples used to be misaligned without any warning.

See PRs #13–#17 for details.