runSDEA | R Documentation |
This function conducts differential expression analysis (DEA) where data points are grouped based on their distance to a SpatialAnnotation.
runSDEA(
object,
interval,
id = idSA(object),
naming = "sdea_{id}",
method_de = "wilcox",
base = 2,
overwrite = FALSE,
...
)
object |
An object of class |
interval |
Distance measure. The width of the spatial intervals in which the data points are grouped starting from the boundary of the spatial annotation till the edge of the tissue is reached. |
id |
Character value specifying the ID of the spatial annotation of interest. If there is only one spatial annotation in the object, the function will default to using it. However, if there are multiple annotations, this argument must be explicitly specified to identify the target annotation. |
naming |
A |
method_de |
Character value. Denotes the method to according to which the de-analysis is performed.
Given to argument |
overwrite |
Logical value. Must be |
... |
Used to absorb deprecated arguments or functions. |
This function bases on the concept of runDEA()
where gene expression
is compared across different groups within a grouping variable. However, in contrast to
runDEA()
where the grouping variable is denoted via across
, the function runSDEA()
creates a grouping variable in which data points are grouped based on their distance
to a SpatialAnnotation
. This approach aims to identify genes that are upregulated
within certain distance intervals to the spatial annotation of interest. The spatial
interval is defined via the argument interval
. E.g. if interval = 500um
data points
are grouped in 500um intervals starting from the boundaries of the spatial annotation
until the edge of the tissue is reached. The names of the groups correspond
to the distance itself: 500um, 1000um, 1500um, etc. If interval = 0.5mm
, which
is equivalent to 500um, the grouping will be the same but the group names correspond
to 0.5mm, 1mm, 1.5mm, etc. Data points that lie within the boundaries
of the spatial annotation are assigned to group core.
The grouping variable created this way is stored in the feature data.frame as any other grouping variable and the DEA results are stored in slot @dea as all other DEA results.
The updated input object, containing the added, removed or computed results.
The vignette on distance measures in SPATA2 has been replaced. Click
here
to read it.
createGroupAnnotations()
, createImageAnnotations()
,
createNumericAnnotations()
to create spatial annotations.
The function getCoordsDfSA()
relates data points to a spatial annotation.
This information is used by runSDEA()
to create the spatial grouping.
plotDeaDotplot()
to visualize results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.