martinjzhang / scDRS

Single-cell disease relevance score (scDRS)
https://martinjzhang.github.io/scDRS/
MIT License
105 stars 13 forks source link

Test cli #15

Closed martinjzhang closed 2 years ago

martinjzhang commented 2 years ago
  1. Printing more info for ./bin/scdrs; added sc.pp.pca before sc.pp.neighbors (otherwise sc.pp.neighbors will use all PCs instead of the number specified by n_pcs; we didn't find this before because we used all PCs for the toy data)
  2. Similarly, added sc.pp.pca for compute_downstream.py
  3. Updated files in ./scdrs/data/res to those generated using scdrs CLI (I checked that they are consistent)
  4. Added following files used by unit test:
    • scdrs/data/toydata_gs_mouse.ref_Ctrl20_CovConstCovariate.full_score.gz
    • scdrs/data/toydata_gs_mouse.ref_Ctrl20_CovConstCovariate.scdrs_cell_corr
    • scdrs/data/toydata_gs_mouse.ref_Ctrl20_CovConstCovariate.scdrs_gene
    • scdrs/data/toydata_gs_mouse.ref_Ctrl20_CovConstCovariate.scdrs_group.cell_type
    • scdrs/data/toydata_gs_mouse.ref_Ctrl20_CovConstCovariate.score.gz
  5. Minor changes to scdrs/method.py
  6. Added unit tests in tests/test_method_downstream.py (could you review test_downstream_group_analysis)?
KangchengHou commented 2 years ago

I don't follow on (1): if i call sc.pp.neighbors(adata, n_pcs=10) for an adata without precomputed PCs. Is this saying it will ignore the n_pcs parameter?

martinjzhang commented 2 years ago

I don't follow on (1): if i call sc.pp.neighbors(adata, n_pcs=10) for an adata without precomputed PCs. Is this saying it will ignore the n_pcs parameter?

In this case, I think it will call sc.pp.pca with its default parameters n_comps =min(50, min(adata.shape)-1), and then use all the computed PCs for sc.pp.neighbors(adata). I checked it in the script but I will try to create a minimal example to illustrate this.