R/st_compr_class.R
stcompr.RdCreate a STCompR compare class to compare two sets of STGrid objects. By default differential expression is performed with DESeq2. If only one sample of each classe is provided, a Fisher's exact test is performed.
A STGrid object.
A STGrid object.
A string to name classe 1.
A string to name classe 2.
See estimateDispersions() in DESeq2 library.
The pvalue correction method. See stats::p.adjust.
A pseudo-count value to be stored in the object.
An object of class 'STCompR'.
# Example usage:
example_dataset()
xen <- Xenium_Mouse_Brain_Coronal_7g
x_bins <- bin_x(xen)[181:nbin_x(xen)]
y_bins <- bin_y(xen)[101:nbin_y(xen)]
xen_r1 <- xen[x_bins, y_bins]
x_bins <- bin_x(xen)[61:101]
y_bins <- bin_y(xen)[101:nbin_y(xen)]
xen_r2 <- xen[x_bins, y_bins]
cmp <- stcompr(list(xen_r1=xen_r1), list(xen_r2=xen_r2))