Description Usage Arguments Value Author(s) Examples
View source: R/plotWithinFactor.R
This function can be used to evaluate the extent of gene-specific biases in the data. If a bias exists, the plots provided here will identify whether it affects cells equally or not. Correction for such features may be considered especially if the bias is different between conditions (see SCnorm vignette for details).
1 2 3 4 5 6 7 | plotWithinFactor(
Data,
withinSample = NULL,
Conditions = NULL,
FilterExpression = 0,
NumExpressionGroups = 4
)
|
Data |
can be a matrix of single-cell expression with cells
where rows are genes and columns are samples. Gene names should
not be a column in this matrix, but should be assigned to rownames(Data).
Data can also be an object of class |
withinSample |
a vector of gene-specific features. |
Conditions |
vector of condition labels, this should correspond to the columns of the un-normalized expression matrix. If provided the cells will be colored by Condition instead of individually. |
FilterExpression |
exclude genes having median of non-zero expression below this threshold. |
NumExpressionGroups |
the number of groups to split the within sample factor into, e.g genes will be split into equally sized groups based on their GC content/Gene length/etc. |
produces a plot and returns the data the plot is based on.
Rhonda Bacher
1 2 3 4 5 6 7 |
data(ExampleSimSCData)
Conditions = rep(c(1,2), each= 90)
exampleFactor = runif(dim(ExampleSimSCData)[1], 0, 1)
names(exampleFactor) = rownames(ExampleSimSCData)
#plotWithinFactor(Data = ExampleSimSCData,
#withinSample=exampleFactor, Conditions = Conditions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.