initiateSpataObject_ExprMtr.Rd
Default function for any spatial related experiment whoose output is an already processed expression/intensity matrix. See details for more information.
initiateSpataObject_ExprMtr(
coords_df,
expr_mtr,
sample_name,
spatial_method = "Unknown",
count_mtr = NULL,
mtr_name = "scaled",
image = NULL,
image_class = "HistologyImage",
image_object = NULL,
directory_spata = NULL,
combine_with_wd = FALSE,
gene_set_path = NULL,
k = 50,
nn = NULL,
runPca = list(n_pcs = 30),
runTsne = list(tsne_perplexity = 30),
runUmap = list(),
verbose = TRUE
)
Data.frame containing information about the positions of all barcode-spots in form of a numeric x- and y-variable. The key-variable barcodes needs to be of type character and must be identical to the column names of the input matrix.
A numeric matrix. The expression matrix to be used.
Character value. Denotes the name of the sample you are
analyzing with the spata-object. The future input for SPATA's of_sample
-argument.
An Image of the sample that can be displayed as the surface plot's background.
Character value (or NULL). Specifies the path to a .RDS-file containing a data.frame that is to be used as input for slot @used_genesets.
Must have the character-variables
'ont': The gene set names.
'gene': The belonging gene names.
If set to NULL the default gene-set data.frame will used. Run ?gsdf
to get more information.
Numeric value. Given to argument k
of function RANN::nn2()
: Determines to maximum number
of nearest neighbours to compute. (nn
is deprecated.)
A spata2
object.
After initiating the spata2
object PCA is performed via irlba::prcomp_irlba()
and clustering
is done via RANN::nn2()
. (Use addFeatures()
to add any clustering results of your own analysis.)
Additional dimensional reduction is performed via Rtsne::Rtsne()
and umap::umap()
.
Note that this function initiates a spata2
object that does not contain a count-matrix! You can
add a count-matrix manually using setCountmatrix()
. As long as there is none functions that
need a count-matrix will throw an error telling you that no count matrix could be found.