This vignette demonstrates the functionality of InSituCor using a precompiled example dataset. InSituCor can be run using the outputs of the FlatFiles export module [link?], specifically the counts file (_exprMat_file.csv) and the metadata file (_metadata_file.csv). To replicate the vignette with the flat files, the following steps should be followed:
metadata$celltype <- metadata$RNAnbclust*_clusters #cell type column name will be long
conditionon <- metadata[, c("cell","celltype")]
rownames(conditionon) <- metadata$cell
conditionon$cell <- NULL
prepare xy data
xy <- annot[,c("cell", "x", "y")] #the x and y coordinates
This vignette demonstrates the functionality of InSituCor using a precompiled example dataset. InSituCor can be run using the outputs of the FlatFiles export module [link?], specifically the counts file (_exprMat_file.csv) and the metadata file (_metadata_file.csv). To replicate the vignette with the flat files, the following steps should be followed:
Load flat files
metadata <- read.csv("S0_metadata_file.csv") counts <- read.csv("S0_exprMat_file.csv")
prepare counts file
rownames(counts) <- counts$cell counts <- counts[,-c(1,2,3)] #remove metadata columns counts <- as.matrix(counts)
prepare metadata
metadata$celltype <- metadata$RNAnbclust*_clusters #cell type column name will be long conditionon <- metadata[, c("cell","celltype")] rownames(conditionon) <- metadata$cell conditionon$cell <- NULL
prepare xy data
xy <- annot[,c("cell", "x", "y")] #the x and y coordinates
cell type data
Celltype <- annot$celltype