Skip to content

Commit

Permalink
fixed README
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-leary7 committed Nov 17, 2023
1 parent 6cac85c commit 16af962
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ scLANE_models_gee <- testDynamic(sim_data,
is.gee = TRUE,
id.vec = sim_data$subject,
cor.structure = "ar1",
n.cores = 4)
n.cores = 4,
verbose = FALSE)
```

We again generate the table of DE test results. The variance of the estimated coefficients is determined using [the sandwich estimator](https://online.stat.psu.edu/stat504/lesson/12/12.3), and a Wald test is used to compare the null & alternate models.
Expand All @@ -169,7 +170,8 @@ scLANE_models_glmm <- testDynamic(sim_data,
is.glmm = TRUE,
glmm.adaptive = TRUE,
id.vec = sim_data$subject,
n.cores = 4)
n.cores = 4,
verbose = FALSE)
```

**Note:** The GLMM mode is still under development, as we are working on further reducing runtime and increasing the odds of the underlying optimization process converging successfully. As such, updates will be frequent and functionality / results may shift slightly.
Expand All @@ -193,7 +195,7 @@ We can use the `plotModels()` to visually compare different types of models. It

```{r plot-models-glm}
plotModels(scLANE_models_glm,
gene = "JARID2",
gene = scLANE_res_glm$Gene[1],
pt = order_df,
expr.mat = sim_data,
size.factor.offset = cell_offset,
Expand All @@ -207,7 +209,7 @@ Model comparison using the GEE mode is similar, with the only change being that

```{r plot-models-gee}
plotModels(scLANE_models_gee,
gene = "DGUOK",
gene = scLANE_res_gee$Gene[1],
is.gee = TRUE,
id.vec = sim_data$subject,
pt = order_df,
Expand All @@ -223,7 +225,7 @@ When plotting the models generated using the GLMM mode, we split by lineage & co

```{r plot-models-glmm, fig.width=9, fig.height=9}
plotModels(scLANE_models_glmm,
gene = "FLOT2",
gene = scLANE_res_glmm$Gene[1],
pt = order_df,
expr.mat = sim_data,
size.factor.offset = cell_offset,
Expand All @@ -246,6 +248,16 @@ scLANE_models_glm[["JARID2"]]$Lineage_A$Gene_Dynamics %>%
col.names = c("Gene", "Lineage", "Breakpoint", "First Slope", "Second Slope", "First Trend", "Second Trend"))
```

Coefficients can also be plotted like so:

```{r}
plotModelCoefs(scLANE_models_glm,
gene = "JARID2",
pt = order_df,
expr.mat = sim_data,
size.factor.offset = cell_offset)
```

### Knot distribution

Lastly, we can pull the locations in pseudotime of all the knots fitted by `scLANE`. Visualizing this distribution gives us some idea of where transcriptional switches are occurring in the set of genes classified as dynamic.
Expand Down

0 comments on commit 16af962

Please sign in to comment.