Skip to content

Commit 9456413

Browse files
authored
Merge pull request #185 from jr-leary7/dev
Dev
2 parents 09e6daf + 44ab8f3 commit 9456413

8 files changed

+40
-32
lines changed

R/geneProgramSignificance.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#' @param pt A vector of pseudotime values for each cell. May contain NAs, which are handled internally. Defaults to NULL.
1313
#' @param program.labels (Optional) A character vector specifying a label for each gene cluster. Defaults to NULL.
1414
#' @param p.adj.method (Optional) The method used to adjust \emph{p}-values for multiple hypothesis testing. Defaults to "holm".
15+
#' @details
16+
#' \itemize{
17+
#' \item This function assumes that the gene program scores have been min-max normalized to (0, 1) i.e., \emph{not} including the values 0 or 1. This is necessary to fit the Beta distribution additive model. This normalization can be easily generated by setting the argument \code{minmax.norm = TRUE} in the \code{\link{geneProgramScoring}} function.
18+
#' }
1519
#' @return A table of statistical output showing the significance of the association between pseudotime and program scores.
1620
#' @seealso \code{\link{geneProgramScoring}}
1721
#' @export

R/theme_scLANE.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ theme_scLANE <- function(base.size = 12,
3131
base_line_size = base.lwd,
3232
base_rect_size = base.lwd) +
3333
ggplot2::theme(strip.clip = "off",
34-
strip.background = ggplot2::element_rect(linewidth = base.lwd))
34+
strip.background = ggplot2::element_rect(linewidth = base.lwd),
35+
axis.line = ggplot2::element_line(lineend = "square"))
3536
if (umap) {
3637
scLANE_theme <- scLANE_theme +
3738
ggplot2::theme(axis.ticks = ggplot2::element_blank(),

README.Rmd

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ knitr::opts_chunk$set(warning = FALSE,
3131
![last commit](https://img.shields.io/github/last-commit/jr-leary7/scLANE/main?color=darkgreen)
3232
[![codecov](https://codecov.io/gh/jr-leary7/scLANE/branch/main/graph/badge.svg?token=U2U5RTF2VW)](https://codecov.io/gh/jr-leary7/scLANE)
3333
[![CodeFactor](https://www.codefactor.io/repository/github/jr-leary7/sclane/badge)](https://www.codefactor.io/repository/github/jr-leary7/sclane)
34-
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.5281/zenodo.10182497&color=blue)](https://doi.org/10.5281/zenodo.10182497)
34+
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.1101/2023.12.19.572477&color=blue)](https://doi.org/10.1101/2023.12.19.572477)
3535
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3636
<!-- badges: end -->
3737

@@ -115,7 +115,7 @@ scLANE_models_glm <- testDynamic(sim_data,
115115
pt = order_df,
116116
genes = gene_sample,
117117
size.factor.offset = cell_offset,
118-
n.cores = 4,
118+
n.cores = 4L,
119119
verbose = FALSE)
120120
```
121121

@@ -142,7 +142,7 @@ scLANE_models_gee <- testDynamic(sim_data,
142142
is.gee = TRUE,
143143
id.vec = sim_data$subject,
144144
cor.structure = "ar1",
145-
n.cores = 4,
145+
n.cores = 4L,
146146
verbose = FALSE)
147147
```
148148

@@ -168,9 +168,8 @@ scLANE_models_glmm <- testDynamic(sim_data,
168168
size.factor.offset = cell_offset,
169169
n.potential.basis.fns = 3,
170170
is.glmm = TRUE,
171-
glmm.adaptive = TRUE,
172171
id.vec = sim_data$subject,
173-
n.cores = 4,
172+
n.cores = 4L,
174173
verbose = FALSE)
175174
```
176175

README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
commit](https://img.shields.io/github/last-commit/jr-leary7/scLANE/main?color=darkgreen)
3131
[![codecov](https://codecov.io/gh/jr-leary7/scLANE/branch/main/graph/badge.svg?token=U2U5RTF2VW)](https://codecov.io/gh/jr-leary7/scLANE)
3232
[![CodeFactor](https://www.codefactor.io/repository/github/jr-leary7/sclane/badge)](https://www.codefactor.io/repository/github/jr-leary7/sclane)
33-
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.5281/zenodo.10182497&color=blue)](https://doi.org/10.5281/zenodo.10182497)
33+
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.1101/2023.12.19.572477&color=blue)](https://doi.org/10.1101/2023.12.19.572477)
3434
[![License:
3535
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3636
<!-- badges: end -->
@@ -172,12 +172,12 @@ scLANE_models_glm <- testDynamic(sim_data,
172172
pt = order_df,
173173
genes = gene_sample,
174174
size.factor.offset = cell_offset,
175-
n.cores = 4,
175+
n.cores = 4L,
176176
verbose = FALSE)
177177
#> Registered S3 method overwritten by 'bit':
178178
#> method from
179179
#> print.ri gamlss
180-
#> scLANE testing completed for 100 genes across 1 lineage in 45.702 secs
180+
#> scLANE testing completed for 100 genes across 1 lineage in 35.37 secs
181181
```
182182

183183
After the function finishes running, we use `getResultsDE()` to generate
@@ -195,13 +195,13 @@ select(scLANE_res_glm, Gene, Lineage, Test_Stat, P_Val, P_Val_Adj, Gene_Dynamic_
195195
col.names = c("Gene", "Lineage", "LRT stat.", "P-value", "Adj. p-value", "Predicted dynamic status"))
196196
```
197197

198-
| Gene | Lineage | LRT stat. | P-value | Adj. p-value | Predicted dynamic status |
199-
|:---------|:--------|----------:|--------:|-------------:|-------------------------:|
200-
| MFSD2B | A | 216.750 | 0.000 | 0.000 | 1 |
201-
| RPL29 | A | 5.632 | 0.018 | 0.353 | 0 |
202-
| UAP1L1 | A | 9.880 | 0.007 | 0.157 | 0 |
203-
| TMCO3 | A | 167.709 | 0.000 | 0.000 | 1 |
204-
| GOLGA8EP | A | 4.359 | 0.037 | 0.487 | 0 |
198+
| Gene | Lineage | LRT stat. | P-value | Adj. p-value | Predicted dynamic status |
199+
|:-----------|:--------|----------:|--------:|-------------:|-------------------------:|
200+
| RAB1B | A | 219.950 | 0.000 | 0.000 | 1 |
201+
| LY75.CD302 | A | 4.858 | 0.028 | 0.541 | 0 |
202+
| UAP1L1 | A | 9.894 | 0.007 | 0.163 | 0 |
203+
| TMCO3 | A | 167.311 | 0.000 | 0.000 | 1 |
204+
| GOLGA8EP | A | 4.201 | 0.040 | 0.567 | 0 |
205205

206206
### GEE mode
207207

@@ -222,9 +222,9 @@ scLANE_models_gee <- testDynamic(sim_data,
222222
is.gee = TRUE,
223223
id.vec = sim_data$subject,
224224
cor.structure = "ar1",
225-
n.cores = 4,
225+
n.cores = 4L,
226226
verbose = FALSE)
227-
#> scLANE testing completed for 100 genes across 1 lineage in 2.201 mins
227+
#> scLANE testing completed for 100 genes across 1 lineage in 1.525 mins
228228
```
229229

230230
We again generate the table of DE test results. The variance of the
@@ -242,11 +242,11 @@ select(scLANE_res_gee, Gene, Lineage, Test_Stat, P_Val, P_Val_Adj, Gene_Dynamic_
242242

243243
| Gene | Lineage | Wald stat. | P-value | Adj. p-value | Predicted dynamic status |
244244
|:---------|:--------|-----------:|--------:|-------------:|-------------------------:|
245-
| DGUOK | A | 64351.893 | 0 | 0 | 1 |
246-
| TBCC | A | 32.151 | 0 | 0 | 1 |
245+
| DGUOK | A | 200675.460 | 0 | 0 | 1 |
246+
| TBCC | A | 40.399 | 0 | 0 | 1 |
247247
| GOLGA8EP | A | NA | NA | NA | 0 |
248-
| TMC6 | A | 5052.168 | 0 | 0 | 1 |
249-
| JARID2 | A | 1512.240 | 0 | 0 | 1 |
248+
| EMC3 | A | 8397.337 | 0 | 0 | 1 |
249+
| DDX41 | A | 3486.998 | 0 | 0 | 1 |
250250

251251
### GLMM mode
252252

@@ -267,11 +267,10 @@ scLANE_models_glmm <- testDynamic(sim_data,
267267
size.factor.offset = cell_offset,
268268
n.potential.basis.fns = 3,
269269
is.glmm = TRUE,
270-
glmm.adaptive = TRUE,
271270
id.vec = sim_data$subject,
272-
n.cores = 4,
271+
n.cores = 4L,
273272
verbose = FALSE)
274-
#> scLANE testing completed for 100 genes across 1 lineage in 2.968 mins
273+
#> scLANE testing completed for 100 genes across 1 lineage in 3.133 mins
275274
```
276275

277276
**Note:** The GLMM mode is still under development, as we are working on
@@ -291,13 +290,13 @@ select(scLANE_res_glmm, Gene, Lineage, Test_Stat, P_Val, P_Val_Adj, Gene_Dynamic
291290
col.names = c("Gene", "Lineage", "LRT stat.", "P-value", "Adj. p-value", "Predicted dynamic status"))
292291
```
293292

294-
| Gene | Lineage | LRT stat. | P-value | Adj. p-value | Predicted dynamic status |
295-
|:--------|:--------|----------:|--------:|-------------:|-------------------------:|
296-
| DDX1 | A | 132.422 | 0.000 | 0 | 1 |
297-
| GGNBP2 | A | 73.683 | 0.000 | 0 | 1 |
298-
| WDSUB1 | A | NA | NA | NA | 0 |
299-
| FAM135B | A | NA | NA | NA | 0 |
300-
| DAB1 | A | 9.217 | 0.684 | 1 | 0 |
293+
| Gene | Lineage | LRT stat. | P-value | Adj. p-value | Predicted dynamic status |
294+
|:-------|:--------|----------:|--------:|-------------:|-------------------------:|
295+
| VDAC1 | A | 205.644 | 0.000 | 0 | 1 |
296+
| CKAP4 | A | 139.246 | 0.000 | 0 | 1 |
297+
| MRTO4 | A | 5.048 | 0.998 | 1 | 0 |
298+
| FOXD3 | A | 2.586 | 1.000 | 1 | 0 |
299+
| UBE2Q1 | A | 94.077 | 0.000 | 0 | 1 |
301300

302301
## Downstream analysis & visualization
303302

952 Bytes
Loading
6.3 KB
Loading
43.8 KB
Loading

man/geneProgramSignificance.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)