1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readImgData.R
\name{readImgData}
\alias{readImgData}
\title{Read images & scale factors for 10x Genomics Visium}
\usage{
readImgData(
path = ".",
sample_id = names(path),
imageSources = file.path(path, "tissue_lowres_image.png"),
scaleFactors = file.path(path, "scalefactors_json.json"),
load = TRUE
)
}
\arguments{
\item{path}{a path where to find one or more images}
\item{sample_id}{the \code{sample_id} for the \code{\link{SpatialExperiment}}
object}
\item{imageSources}{the images source path(s)}
\item{scaleFactors}{the .json file where to find the scale factors}
\item{load}{logical; should the image(s) be loaded into memory
as a \code{grob}? If FALSE, will store the path/URL instead.}
}
\value{
a \code{\link{DataFrame}}
}
\description{
Function to read in images and scale factors for 10x Genomics Visium data,
and return as a valid \code{\link{imgData}} \code{DataFrame}.
}
\examples{
dir <- system.file(
file.path("extdata", "10xVisium", "section1", "outs", "spatial"),
package = "SpatialExperiment")
# base directory contains
# - scale factors (scalefactors_json.json)
# - one image (tissue_lowres_image.png)
list.files(dir)
# read in images & scale factors
# as valid 'imgData' 'DFrame'
readImgData(dir, sample_id = "foo")
}
\author{
Helena L. Crowell
}
|