Skip to content

Commit

Permalink
Use fig.height = 4 on the rmarkdown chunks to reduce the inst/doc/v…
Browse files Browse the repository at this point in the history
…isiumStitched.html file size from like 9 mb to 6.4, which then reduces the package tarball to below 5 mb

Co-authored-by: Nick Eagles <[email protected]>
  • Loading branch information
lcolladotor and Nick-Eagles committed Jul 24, 2024
1 parent 02536b1 commit 563a9e7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions vignettes/visiumStitched.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ memory footprints.
```{r "prep_fiji"}
spe_input_dir <- tempdir()
prep_fiji_coords(sample_info, out_dir = spe_input_dir)
prep_fiji_image(sample_info, out_dir = spe_input_dir, lowres_max_size = 400)
prep_fiji_image(sample_info, out_dir = spe_input_dir)
```

## Constructing the Object
Expand Down Expand Up @@ -240,7 +240,7 @@ variation across spots can bias the apparent distribution. Later, we'll show tha
normalization is critical to producing a visually seamless transition between overlapping
capture areas.

```{r "explore_coords"}
```{r "explore_coords", fig.height = 4}
wm_genes <- rownames(spe)[
match(c("MBP", "GFAP", "PLP1", "AQP4"), rowData(spe)$gene_name)
]
Expand Down Expand Up @@ -299,14 +299,14 @@ colData(spe) |>
As a `SpatialExperiment`, the stitched data may be rotated or mirrored by group, such as with
the `SpatialExperiment::rotateObject()` or `SpatialExperiment::mirrorObject()` functions.

```{r "rotate"}
```{r "rotate", fig.height=4}
vis_gene(
rotateObject(spe, sample_id = "Br2719", degrees = 90),
rotateObject(spe, sample_id = "Br2719", degrees = 180),
geneid = wm_genes, assayname = "counts", is_stitched = TRUE
)
```

```{r "mirror"}
```{r "mirror", fig.height = 4}
vis_gene(
mirrorObject(spe, sample_id = "Br2719", axis = "v"),
geneid = wm_genes, assayname = "counts", is_stitched = TRUE
Expand All @@ -322,7 +322,7 @@ data is log-normalized. Instead of performing normalization here, we'll fetch th
object with [normalized](https://bioconductor.org/books/3.12/OSCA/normalization.html#normalization-by-deconvolution)
counts from `spatialLIBD`, then plot a few white matter genes as before:

```{r "fetch_norm"}
```{r "fetch_norm", fig.height = 4}
spe_norm <- fetch_data(type = "visiumStitched_brain_spe")
wm_genes_ens <- rownames(spe_norm)[
Expand All @@ -337,7 +337,7 @@ vis_gene(

Recall the unnormalized version of this plot, which is not nearly as clean:

```{r "unnorm_plot"}
```{r "unnorm_plot", fig.height = 4}
vis_gene(
spe,
geneid = wm_genes, assayname = "counts", is_stitched = TRUE
Expand Down

0 comments on commit 563a9e7

Please sign in to comment.