Description Usage Arguments Value See Also Examples
View source: R/count.pca_function.R
Basic comparison of CRISPR screen counts: PCA and Pearson correlation plots
1 2 3 4 5 6 7 8 9 10 |
countsTable |
input matrix containing normalized gRNA counts with gRNA ids as row names |
metadata |
input dataframe containing sample names and other identifiers or data |
identifier1 |
string identifying column name of metadata with which to adjust color in PCA plot |
identifier2 |
string identifying column name of metadata with which to adjust size in PCA plot |
identifier3 |
string identifying column name of metadata with which to adjust shape in PCA plot |
batch |
logical - correct for batch effects (requires a batch.id input) |
batch.id |
numerical - column of metadata that identifies the batch effect to remove |
save |
logical - do you want to save the violin plot to pdf |
ggplot object of the violin plot
ggbiplot
which this function uses to plot PCAs
ggplot
which this function uses to plot Pearson correlations
1 2 3 4 5 6 7 | y <- matrix(rnorm(100*9, mean = 10, sd = 1),100,9)
y[,1:3] <- y[,1:3] + 5
metadata <- data.frame(sample = paste0('sample.',1:9), batch = c("A","A","A","B","B","B","C","C","C"))
count.pca(y, metadata, identifier1 = 'sample')
count.pca(y, metadata, identifier1 = 'sample', batch = T, batch.id = 'batch')
...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.