diff --git a/NAMESPACE b/NAMESPACE index 55032e2cd..7b3eb6556 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -493,7 +493,7 @@ import(GiottoUtils) import(GiottoVisuals) import(ggplot2) import(methods) -import(stats) +import(stats, except = density) import(utils) importClassesFrom(data.table,data.table) importFrom(GiottoClass,"activeFeatType<-") diff --git a/R/package_imports.R b/R/package_imports.R index 3aaaecefd..2e69841c7 100644 --- a/R/package_imports.R +++ b/R/package_imports.R @@ -3,7 +3,7 @@ #' @import GiottoVisuals #' @import methods #' @import utils -#' @import stats +#' @rawNamespace import(stats, except = density) #' @import ggplot2 #' @importClassesFrom data.table data.table #' @importFrom data.table setnames setorder setDT diff --git a/man/createGiottoCosMxObject.Rd b/man/createGiottoCosMxObject.Rd index 0362f0472..cbda75fe2 100644 --- a/man/createGiottoCosMxObject.Rd +++ b/man/createGiottoCosMxObject.Rd @@ -31,9 +31,11 @@ coordinates only. \code{'aggregate'} loads the provided aggregated expression ma \item{FOVs}{field of views to load (only affects subcellular data and images)} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/createGiottoMerscopeObject.Rd b/man/createGiottoMerscopeObject.Rd index 960cbeeba..902b18197 100644 --- a/man/createGiottoMerscopeObject.Rd +++ b/man/createGiottoMerscopeObject.Rd @@ -51,9 +51,11 @@ NULL loads all FOVs (very slow)} \item{aggregate_stack_param}{params to pass to \code{\link{aggregateStacks}}} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} diff --git a/man/createGiottoXeniumObject.Rd b/man/createGiottoXeniumObject.Rd index 1c04cf0b8..7200c3346 100644 --- a/man/createGiottoXeniumObject.Rd +++ b/man/createGiottoXeniumObject.Rd @@ -46,9 +46,11 @@ a subcellular transcript detection (default = 20)} \item{key_list}{(advanced) list of grep-based keywords to split the subcellular feature detections by feature type. See details} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/dot-createGiottoCosMxObject_aggregate.Rd b/man/dot-createGiottoCosMxObject_aggregate.Rd index f47f300db..1994734d6 100644 --- a/man/dot-createGiottoCosMxObject_aggregate.Rd +++ b/man/dot-createGiottoCosMxObject_aggregate.Rd @@ -12,11 +12,13 @@ ) } \arguments{ -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} } \description{ Load and create a CosMx Giotto object from aggregate info diff --git a/man/dot-createGiottoCosMxObject_all.Rd b/man/dot-createGiottoCosMxObject_all.Rd index 618a58814..df88e36c9 100644 --- a/man/dot-createGiottoCosMxObject_all.Rd +++ b/man/dot-createGiottoCosMxObject_all.Rd @@ -27,11 +27,13 @@ \item{remove_unvalid_polygons}{remove unvalid polygons (default: TRUE)} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} } \description{ Load and create a CosMx Giotto object from subcellular and aggregate info diff --git a/man/dot-createGiottoCosMxObject_subcellular.Rd b/man/dot-createGiottoCosMxObject_subcellular.Rd index 3e1c19c6b..c57640024 100644 --- a/man/dot-createGiottoCosMxObject_subcellular.Rd +++ b/man/dot-createGiottoCosMxObject_subcellular.Rd @@ -24,11 +24,13 @@ \item{remove_unvalid_polygons}{remove unvalid polygons (default: TRUE)} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} } \description{ Load and create a CosMx Giotto object from subcellular info diff --git a/man/dot-createGiottoXeniumObject_aggregate.Rd b/man/dot-createGiottoXeniumObject_aggregate.Rd index 4ed8cc25a..b77796716 100644 --- a/man/dot-createGiottoXeniumObject_aggregate.Rd +++ b/man/dot-createGiottoXeniumObject_aggregate.Rd @@ -14,9 +14,11 @@ \arguments{ \item{data_list}{list of data loaded by \code{.load_xenium_folder}} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/dot-createGiottoXeniumObject_subcellular.Rd b/man/dot-createGiottoXeniumObject_subcellular.Rd index 03886fd2a..5072b5eb2 100644 --- a/man/dot-createGiottoXeniumObject_subcellular.Rd +++ b/man/dot-createGiottoXeniumObject_subcellular.Rd @@ -22,9 +22,11 @@ into separate giottoPoints objects by feat_type} \item{qv_threshold}{Minimum Phred-scaled quality score cutoff to be included as a subcellular transcript detection (default = 20)} -\item{instructions}{list of instructions or output result from \code{\link[GiottoClass]{createGiottoInstructions}}} +\item{instructions}{list of instructions or output result +from \code{\link[GiottoClass]{createGiottoInstructions}}} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/dot-load_cosmx_folder_aggregate.Rd b/man/dot-load_cosmx_folder_aggregate.Rd index 116cdeb8f..7ecd59161 100644 --- a/man/dot-load_cosmx_folder_aggregate.Rd +++ b/man/dot-load_cosmx_folder_aggregate.Rd @@ -7,7 +7,8 @@ .load_cosmx_folder_aggregate(dir_items, cores, verbose = TRUE) } \arguments{ -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/dot-load_cosmx_folder_subcellular.Rd b/man/dot-load_cosmx_folder_subcellular.Rd index aff95f1a3..d79067d4b 100644 --- a/man/dot-load_cosmx_folder_subcellular.Rd +++ b/man/dot-load_cosmx_folder_subcellular.Rd @@ -9,7 +9,8 @@ \arguments{ \item{FOVs}{field of views to load (only affects subcellular data and images)} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/interpolateFeature.Rd b/man/interpolateFeature.Rd new file mode 100644 index 000000000..325ceb5fd --- /dev/null +++ b/man/interpolateFeature.Rd @@ -0,0 +1,95 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/kriging.R +\name{interpolateFeature} +\alias{interpolateFeature} +\alias{interpolateFeature,giotto,missing-method} +\alias{interpolateFeature,spatLocsObj,data.frame-method} +\title{Spatial feature interpolation} +\usage{ +\S4method{interpolateFeature}{giotto,missing}( + x, + spat_unit = NULL, + feat_type = NULL, + feats, + spatvalues_params = list(), + spat_loc_name = "raw", + ext = NULL, + buffer = 50, + name_fmt = "\%s", + savedir = file.path(getwd(), "interp_rasters"), + overwrite = FALSE, + verbose = NULL, + ... +) + +\S4method{interpolateFeature}{spatLocsObj,data.frame}( + x, + y, + ext = NULL, + buffer = 50, + rastersize = 500, + name_fmt = "\%s", + savedir = file.path(getwd(), "interp_rasters"), + overwrite = FALSE, + ... +) +} +\arguments{ +\item{x}{object containing coordinates to use interpolation with} + +\item{spat_unit}{(optional) spatial unit to use} + +\item{feat_type}{(optional) feature type to use} + +\item{feats}{character vector. Features to interpolate from the `giotto` +object} + +\item{spatvalues_params}{list. Additional list of parameters to pass to +[spatValues()] to help with data retrieval from `giotto` object} + +\item{spat_loc_name}{character. Name of spatial locations to use. Values to +be interpolated are spatially mapped to these locations by cell_ID.} + +\item{ext}{`SpatExtent`. (optional) extent across which to apply the +interpolation. If not provided, will default to the extent of the spatLocsObj +expanded by the value of `buffer`. It can be helpful to set this as the +extent of any polygons that will be used in aggregation.} + +\item{buffer}{numeric. (optional) default buffer to expand derived extent by +if `ext` is not provided.} + +\item{name_fmt}{character. sprintf fmt to apply to `feats` when naming the +resulting interpolation `giottoLargeImage` objects. Default is no change.} + +\item{savedir}{character. Output directory. Default is a new `interp_rasters` +folder in working directory.} + +\item{overwrite}{logical. Whether raster outputs should be overwritten if +the same `filename` is provided.} + +\item{verbose}{be verbose} + +\item{...}{additional params to pass downstream methods} + +\item{y}{data.frame-like. Values for interpolation. Must also have a +`cell_ID` column and that matches with `x`.} + +\item{rastersize}{numeric. Length of major axis in px of interpolation +raster to create.} + +\item{name}{name of interpolation `giottoLargeImage` to generate} + +\item{filename}{character. Output filename. Default is \[`name`\].tif within +the working directory.} +} +\value{ +`giotto` method returns a `giotto` object with newly made appended +feature interpolation rasters as `giottoLargeImages`\cr +} +\description{ +Spatial feature interpolation +} +\details{ +The data.frame method returns a `giottoLargeImage` linked to an interpolated +raster that is written to disk as GeoTIFF. +} diff --git a/man/load_merscope_folder.Rd b/man/load_merscope_folder.Rd index 42571cf25..6e9b9a54c 100644 --- a/man/load_merscope_folder.Rd +++ b/man/load_merscope_folder.Rd @@ -38,7 +38,8 @@ \item{data_to_use}{which of either the 'subcellular' or 'aggregate' information to use for object creation} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} } diff --git a/man/load_xenium_folder.Rd b/man/load_xenium_folder.Rd index af16eff91..3ed9d4603 100644 --- a/man/load_xenium_folder.Rd +++ b/man/load_xenium_folder.Rd @@ -55,7 +55,8 @@ expression matrix} \item{gene_column_index}{which column from the features or genes .tsv file to use for row ids} -\item{cores}{how many cores or threads to use to read data if paths are provided} +\item{cores}{how many cores or threads to use to read data if paths are +provided} \item{verbose}{be verbose when building Giotto object} }