Skip to content

Donordata package - #169

Merged
LArnoldt merged 8 commits into
mainfrom
donordata-package
Nov 20, 2026
Merged

LArnoldt merged 8 commits into
mainfrom
donordata-package

Conversation

@LArnoldt

Copy link
Copy Markdown
Collaborator

No description provided.

LArnoldt and others added 6 commits November 17, 2026 14:27
- run_tensorqtl (Python API): missing calls (NaN or negative codes) are
  passed to tensorQTL as -9, the only code it mean-imputes. Before, NaN
  gave NaN p-values in cis_nominal and silently removed the variant in
  the MAF-filtered modes (about 19% of common variants in a cohort with
  sporadic missing calls). Hard calls stay int8.
- run_tensorqtl (command line): the phenotype BED start is written
  0-based; tensorQTL adds 1 on reading, so the window lost 1 bp on the
  left and start_distance was off by one.
- run_tensorqtl docstring: the cis window is the gene body +- window.
- coloc_abf raises on se <= 0, which otherwise gives NaN posteriors.
- run_magma_gene_analysis / run_magma_pipeline: seed (default 1) passed
  as --seed. The SNP-wise mean model samples p-values of strongly
  associated genes, so unseeded runs gave different Z for top genes.
- _fetch_ensembl_annotation drops rows on patches and alternative
  haplotypes, which could replace a gene's primary-assembly position and
  let MHC genes escape the MHC filter.
- generate_sldsc_genesets writes gene symbols in their original case;
  make_annot matches case-sensitively, so upper-cased symbols were lost.
- run_scdrs encodes sex as indicator columns, with "unknown" as missing,
  instead of ordinal category codes.
- estimate_celltype_specific_heritability documents the LDSC-SEG
  all-genes control on each .ldcts line and warns when it is absent.
write_zarr_dd let donordata write D.X unencoded (reading the whole
matrix into memory) and then rewrote it as 2-bit. It now writes
everything except D.X through donordata and the genotypes as 2-bit
column blocks: chr21 peak RSS 1.92 -> 1.25 GB, about 38 GB less at
autosome scale, and no temporary unencoded copy on disk.
@review-notebook-app

Copy link
Copy Markdown

Review Notebooks

Notebooks changed:

Review visual diffs and comment on any notebook cell. All comments sync back to this PR.


Powered by ReviewNB

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.58042% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.57%. Comparing base (4c03816) to head (edb6be4).

Files with missing lines Patch % Lines
src/cellink/tl/external/_tensorqtl.py 27.27% 24 Missing ⚠️
src/cellink/io/_readwrite.py 89.31% 14 Missing ⚠️
src/cellink/tl/external/_mixmil.py 0.00% 14 Missing ⚠️
src/cellink/tl/external/_ldsc.py 22.22% 7 Missing ⚠️
src/cellink/tl/external/_saigeqtl.py 64.70% 6 Missing ⚠️
src/cellink/tl/external/_scdrs.py 0.00% 6 Missing ⚠️
src/cellink/tl/external/_sldsc_utils.py 0.00% 5 Missing ⚠️
src/cellink/tl/external/_jaxqtl.py 71.42% 4 Missing ⚠️
src/cellink/pl/_expression.py 77.77% 2 Missing ⚠️
src/cellink/tl/external/_magma.py 66.66% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   50.27%   50.57%   +0.29%     
==========================================
  Files          80       78       -2     
  Lines       10126     9665     -461     
==========================================
- Hits         5091     4888     -203     
+ Misses       5035     4777     -258     
Files with missing lines Coverage Δ
src/cellink/_core/__init__.py 100.00% <100.00%> (ø)
src/cellink/_core/data_fields.py 100.00% <100.00%> (ø)
src/cellink/_core/dummy_data.py 97.43% <100.00%> (+15.38%) ⬆️
src/cellink/_core/schema.py 100.00% <100.00%> (+14.28%) ⬆️
src/cellink/at/fetch.py 88.78% <100.00%> (+0.32%) ⬆️
src/cellink/at/resolver.py 98.00% <100.00%> (ø)
src/cellink/io/__init__.py 100.00% <100.00%> (ø)
src/cellink/io/_export.py 93.43% <ø> (ø)
src/cellink/io/_pgen.py 92.00% <ø> (-0.34%) ⬇️
src/cellink/pp/__init__.py 100.00% <100.00%> (ø)
... and 16 more

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LArnoldt
LArnoldt merged commit cbc6840 into main Nov 20, 2026
9 checks passed
@LArnoldt
LArnoldt deleted the donordata-package branch November 20, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant