merge_two_expfiles
Used to combine two single cell type datasets.
merge_two_expfiles(
exp1,
exp2,
annot1,
annot2,
name1 = "",
name2 = "",
as_sparse = TRUE,
as_DelayedArray = FALSE,
verbose = TRUE
)
Numerical expression matrix for dataset1 with row for each gene and column for each cell. Row names are gene symbols. Column names are cell IDs which can be cross referenced against the annot data frame.
Numerical expression matrix for dataset2 with row for each gene and column for each cell. Row names are gene symbols. Column names are cell IDs which can be cross referenced against the annot data frame.
Annotation data frame for dataset1 which contains three columns at least: cell_id, level1class and level2class
Annotation data frame for dataset2 which contains three columns at least: cell_id, level1class and level2class
Name used to refer to dataset 1. Leave blank if it's already a merged dataset.
Name used to refer to dataset 2. Leave blank if it's already a merged dataset.
Convert the merged exp
to a sparse matrix.
Convert the merged exp
to
a DelayedArray
.
Print messages.
List containing merged exp and annot.
cortex_mrna <- ewceData::cortex_mrna()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
exp1 <- cortex_mrna$exp[, 1:50]
exp2 <- cortex_mrna$exp[, 51:100]
annot1 <- cortex_mrna$annot[1:50, ]
annot2 <- cortex_mrna$annot[51:100, ]
merged_res <- EWCE::merge_two_expfiles(
exp1 = exp1,
exp2 = exp2,
annot1 = annot1,
annot2 = annot2,
name1 = "dataset1",
name2 = "dataset2"
)
#> 0 non-overlapping gene(s) removed from exp1.
#> 0 non-overlapping gene(s) removed from exp2.
#> 19,972 intersecting genes remain.
#> Converting to data.frame
#> Converting to data.frame
#> Converting to sparse matrix.