R/reference_construction.R
load_scdata.Rd
Load and preprocess scRNA-seq/snRNA-seq data using seurat SCTransform workflow.
path to scRNA-seq/snRNA-seq data.
a character value specifying data type of the input scRNA-seq/snRNA-seq data, should be one of "cellranger", "h5", "matrix".
a data.frame with rows representing cells, columns representing cell attributes.
minimum # of features with non-zero UMIs. Cells with # of features lower than nfeature_rna will be removed. Default to 200.
maximum percentage of mitochondria (MT) mapped UMIs. Cells with MT percentage higher than percent_mt will be removed. Default to 40.
cell-cycle genes curated by Seurat. Can be loaded via data(cc.genes)
a list of character values indicating the variables to regress for SCTransform normalization step. Default is to regress out MT percentage ("percent_mt") & cell cycle effects ("phase")
a character value specifying project or sample id. Only used for printing purposes.
logical value indicating whether to print messages.
additional parameters passed to SCTransform
.
a Seurat-class
object.
For more details, refer to construct_ref
if (FALSE) {
samplepath1 <- paste0(system.file("extdata", package = "SCdeconR"), "/refdata/sample1")
samplepath2 <- paste0(system.file("extdata", package = "SCdeconR"), "/refdata/sample2")
ref_list <- c(samplepath1, samplepath2)
phenopath1 <- paste0(system.file("extdata", package = "SCdeconR"),
"/refdata/phenodata_sample1.txt")
phenopath2 <- paste0(system.file("extdata", package = "SCdeconR"),
"/refdata/phenodata_sample2.txt")
phenodata_list <- c(phenopath1,phenopath2)
tmp <- load_scdata(
ref = ref_list[[1]],
data_type = c("cellranger"),
meta_info = fread(file = phenodata_list[[1]], check.names = FALSE, header = TRUE),
nfeature_rna = 50,
vars_to_regress = c("percent_mt"),
id = 1,
verbose = TRUE)
}