Combine_scRNAseq: combine multiple scRNAseq datasets into one and generate QC...

Description Usage Arguments Value See Also Examples

View source: R/scRNABatchQC.R

Description

Combine and compare multiple single cell RNAseq datasets, including
1)combine into one dataset;
2)find highly variable genes, reduce dimensions using PCA and tSNE for the combined dataset;
3)pairwise comparsion between any two datasets to find the top differentially expressed genes;

Usage

1
2
3
4
5
6
7
8
9
Combine_scRNAseq(
  sces,
  nHVGs = 1000,
  nPCs = 10,
  logFC = 1,
  FDR = 0.01,
  sampleRatio = 1,
  organism = "mmusculus"
)

Arguments

sces

a list of SingleCellExperiment objects (results from Process_scRNAseq); each object corresponds to one single cell RNAseq dataset

nHVGs

integer; the number of highly variable genes (default:1000)

nPCs

integer; the number of principal components (default:10)

logFC

float; log fold change cutoff to select differentially expressed genes (default: 1)

FDR

float; FDR cutoff to select differentially expressed genes (default: 0.01)

sampleRatio

float; the ratio of cells sampled from each dataset to examine the expression similarity(default: 1)

organism

string; the organism of single cell RNAseq datasets;if supported by WebGestaltR, the functional enrichment will be performed; (defeault: mmusculus)

Value

a SingleCellExperiment object with several slots:

See Also

Process_scRNAseq , generateReport

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(scRNABatchQC)
sces<-Process_scRNAseq(inputs=c("https://github.com/liuqivandy/scRNABatchQC/raw/master/bioplar1.csv.gz","https://github.com/liuqivandy/scRNABatchQC/raw/master/bioplar5.csv.gz"))
scesMerge <- Combine_scRNAseq(sces)
logcounts(scesMerge)[1:5,1:5]
head(scesMerge@rowRanges@metadata$hvg)
summary(scesMerge@metadata$reducedDims$PCA)
#visualize PCA results
plot(scesMerge@metadata$reducedDims$PCA$x[,1:2],pch=16,col=as.factor(scesMerge@colData$condition),xlab="PCA1",ylab="PCA2")
#visualize tSNE results
plot(scesMerge@metadata$reducedDims$tSNE,pch=16,col=as.factor(scesMerge@colData$condition),xlab="tSNE1",ylab="tSNE2")
scesMerge@metadata$diffFC

liuqivandy/scRNABatchQC documentation built on March 24, 2021, 11:01 p.m.