read10xVisiumWrapper: Load data from a 10x Genomics Visium experiment and make it...

View source: R/read10xVisiumWrapper.R

read10xVisiumWrapperR Documentation

Load data from a 10x Genomics Visium experiment and make it spatialLIBD-ready

Description

This function expands SpatialExperiment::read10xVisium() to include analysis results from SpaceRanger by 10x Genomics as well as add information needed by run_app() to visualize the data with the spatialLIBD shiny web application.

Usage

read10xVisiumWrapper(
  samples = "",
  sample_id = paste0("sample", sprintf("%02d", seq_along(samples))),
  type = c("HDF5", "sparse"),
  data = c("filtered", "raw"),
  images = c("lowres", "hires", "detected", "aligned"),
  load = TRUE,
  reference_gtf = NULL,
  chrM = "chrM",
  gtf_cols = c("source", "type", "gene_id", "gene_version", "gene_name", "gene_type"),
  verbose = TRUE
)

Arguments

samples

Passed to SpatialExperiment::read10xVisium().

sample_id

Passed to SpatialExperiment::read10xVisium().

type

Passed to SpatialExperiment::read10xVisium().

data

Passed to SpatialExperiment::read10xVisium().

images

Passed to SpatialExperiment::read10xVisium().

load

Passed to SpatialExperiment::read10xVisium().

reference_gtf

A character(1) specifying the path to the reference genes.gtf file. If not specified, it will be automatically inferred from the web_summary.html file for the first samples.

chrM

A character(1) specifying the chromosome name of the mitochondrial chromosome. Defaults to chrM.

gtf_cols

A character() specifying which columns to keep from the GTF file. "gene_name" and "gene_id" have to be included in gtf_cols.

verbose

A logical(1) specifying whether to show progress updates.

Value

A SpatialExperiment object with the clustering and dimension reduction (projection) results from SpaceRanger by 10x Genomics as well as other information used by run_app() for visualzing the gene expression data.

See Also

Other Utility functions for reading data from SpaceRanger output by 10x Genomics: add10xVisiumAnalysis(), read10xVisiumAnalysis()

Examples

## See 'Using spatialLIBD with 10x Genomics public datasets' for
## a full example using this function.
if (interactive()) {
    browseVignettes(package = "spatialLIBD")
}

## Note that ?SpatialExperiment::read10xVisium doesn't include all the files
## we need to illustrate read10xVisiumWrapper().

LieberInstitute/spatialLIBD documentation built on Nov. 4, 2024, 11:57 a.m.