You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/TenX_data_download.Rmd
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -452,6 +452,8 @@ list.files(docs_path)
452
452
453
453
# Wrapper functions
454
454
455
+
## read10xVisiumWrapper
456
+
455
457
To facilitate reading in the data and preparing it to visualize it interactively using `spatialLIBD::run_app()`, we implemented `read10xVisiumWrapper()` which expands `SpatialExperiment::read10xVisium()` and performs the steps described in this vignette. In this example, we'll load all four images created by SpaceRanger: lowres, hires, detected, and aligned. That way we can toggle between them on the web application.
456
458
457
459
```{r wrapper_functions}
@@ -483,6 +485,32 @@ if (interactive()) {
483
485
}
484
486
```
485
487
488
+
## spe_add_info
489
+
490
+
Alternatively, you may already have a `SpatialExperiment` object, and simply
491
+
want to prepare it for `spatialLIBD::run_app()`. In this case, you may use
492
+
`spatialLIBD::spe_add_info()`, which wraps around the preparation steps
493
+
discussed above.
494
+
495
+
```{r spe_add_info}
496
+
## Read in as a SpatialExperiment object. You may also consider something like
497
+
## VisiumIO::TENxVisiumList() and VisiumIO::import()
## Here we add the additional info needed by spatialLIBD::run_app()
506
+
spe_wrapper2 <- spe_add_info(
507
+
spe_wrapper2,
508
+
samples = file.path(tempdir(), "outs"),
509
+
sample_id = "lymph",
510
+
reference_gtf = gtf_cache
511
+
)
512
+
```
513
+
486
514
# Publishing your web application
487
515
488
516
Now we have have our `spe_wrapper` object and have verified that the web application works, we can share it with others through [shinyapps.io](https://www.shinyapps.io/) by RStudio if our data is small enough. To do, you will need to:
0 commit comments