Skip to content

Commit

Permalink
Some changes while reviewing docs with Louise
Browse files Browse the repository at this point in the history
  • Loading branch information
lcolladotor committed Aug 6, 2024
1 parent b1d7932 commit 2a2532c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
17 changes: 14 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ BiocManager::install("LieberInstitute/DeconvoBuddies")
```
## Example

```{r 'load_packages', echo = FALSE}
```{r 'load_packages', warning = FALSE}
suppressMessages({
library("DeconvoBuddies")
library("dplyr")
Expand All @@ -59,7 +59,7 @@ suppressMessages({


## Access Data
Use `fetch_deconvo_data` Download RNA seqencing data from the Human DLPFC.
Use `fetch_deconvo_data` Download RNA sequencing data from the Human DLPFC.

* `rse_gene`: 110 samples of bulk RNA-seq.

Expand All @@ -81,20 +81,30 @@ marker_stats <- get_mean_ratio(sce_DLPFC_example, cellType_col = "cellType_broad
```

### Extablish Color Scheme

```{r establish_colors}
cell_types <- levels(sce_DLPFC_example$cellType_broad_hc)
cell_colors <- create_cell_colors(cell_types = cell_types, pallet = "classic", split = "\\.", preview = TRUE)
cell_colors <- create_cell_colors(
cell_types = cell_types,
pallet = "classic",
split = "\\.",
preview = TRUE
)
```

### Plot Expression of Specified Genes

Quickly create violin plot of gene expression.

```{r plot_gene_expression}
plot_gene_express(sce = sce_DLPFC_example, category = "cellType_broad_hc", genes = c("GAD2", "CD22"))
plot_gene_express(sce = sce_DLPFC_example, category = "cellType_hc", genes = c("GAD2", "CD22"))
```

### Plot Expression of Marker Genes

Plot the expression of top marker genes from the statistics calculated in `get_mean_ratio`.

```{r plot_marker_expression}
plot_marker_express(sce_DLPFC_example,
marker_stats,
Expand All @@ -106,6 +116,7 @@ plot_marker_express(sce_DLPFC_example,
```

### Create Composition Bar Plot

```{r composition_bar_plot}
# extract phenotype data
pd <- SummarizedExperiment::colData(rse_bulk_test) |>
Expand Down
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ BiocManager::install("LieberInstitute/DeconvoBuddies")

## Example

#> Warning: package 'S4Vectors' was built under R version 4.4.1
#> Warning: package 'IRanges' was built under R version 4.4.1
``` r
suppressMessages({
library("DeconvoBuddies")
library("dplyr")
library("ggplot2")
library("SingleCellExperiment")
})
```

## Access Data

Use `fetch_deconvo_data` Download RNA seqencing data from the Human
Use `fetch_deconvo_data` Download RNA sequencing data from the Human
DLPFC.

- `rse_gene`: 110 samples of bulk RNA-seq.
Expand All @@ -65,7 +71,7 @@ DLPFC.

``` r
if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")
#> 2024-08-02 10:50:28.235565 loading file /Users/louise.huuki/Library/Caches/org.R-project.R/R/BiocFileCache/58f79a421ca_sce_DLPFC_example.Rdata%3Frlkey%3Dv3z4u8ru0d2y12zgdl1az07q9%26st%3D1dcfqc1i%26dl%3D1
#> 2024-08-06 15:34:35.658167 loading file /Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache/ae44256c3eb9_sce_DLPFC_example.Rdata%3Frlkey%3Dv3z4u8ru0d2y12zgdl1az07q9%26st%3D1dcfqc1i%26dl%3D1
```

## Marker Finding
Expand All @@ -82,7 +88,12 @@ marker_stats <- get_mean_ratio(sce_DLPFC_example, cellType_col = "cellType_broad

``` r
cell_types <- levels(sce_DLPFC_example$cellType_broad_hc)
cell_colors <- create_cell_colors(cell_types = cell_types, pallet = "classic", split = "\\.", preview = TRUE)
cell_colors <- create_cell_colors(
cell_types = cell_types,
pallet = "classic",
split = "\\.",
preview = TRUE
)
```

<img src="man/figures/README-establish_colors-1.png" width="100%" />
Expand Down
9 changes: 8 additions & 1 deletion vignettes/DeconvoBuddies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ citation("DeconvoBuddies")

# Quick start to using `DeconvoBuddies`

Let's load some packages we'll use in this vignette.

```{r "load packages", message=FALSE}
suppressMessages({
library("DeconvoBuddies")
Expand Down Expand Up @@ -160,7 +162,12 @@ colors and makes your pallet flexible when considering different 'resolutions' o
cell types.
```{r create_cell_colors demo 2`}
my_cell_types <- levels(sce_DLPFC_example$cellType_broad_hc)
my_cell_colors <- create_cell_colors(cell_types = my_cell_types, pallet = "classic", preview = TRUE, split = "\\.")
my_cell_colors <- create_cell_colors(
cell_types = my_cell_types,
pallet = "classic",
preview = TRUE,
split = "\\."
)
```

### Plot Expression of Top Markers
Expand Down
3 changes: 0 additions & 3 deletions vignettes/Deconvolution_Benchmark_DLPFC.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ BiocManager::valid()
## Load Other Packages

```{r "load_packages", message=FALSE, warning=FALSE}
## install Bisque from cran
# install.packages("BisqueRNA")
library("spatialLIBD")
library("DeconvoBuddies")
library("SummarizedExperiment")
Expand Down

0 comments on commit 2a2532c

Please sign in to comment.