Description Usage Arguments Value Examples
Function creates feature matrix from non-zero SNPs and feature types indicated in features
. The feature matrix used for calculating PCA has n
rows and k
columns, while n
corresponds to number of individuals in the data frame and k
is defined as length of features
x number of non-zero SNPs across all samples.
1 |
.data |
dataframe from scbasic or compatible |
by_chrom |
boolean flag indicating whether to run PCA by chromosome (TRUE or FALSE) |
features |
vector of feature types to use for PCA (columns from |
importances |
boolean flag indicating whether to render dimension importances (TRUE or FALSE) |
metadata |
data frame with metadata - currently grouping by family is supported, given that |
labels |
boolean flag indicating whether to render sample names using package |
ggplot object with PCA plot
1 2 3 4 5 6 7 8 9 10 11 | setwd(system.file(package='SureTypeSCR'))
samplesheet=system.file('files/GSE19247_example.csv',package='SureTypeSCR')
manifest=system.file('files/HumanCytoSNP-12v2_H.bpm',package='SureTypeSCR')
cluster=system.file('files/HumanCytoSNP-12v2_H.egt',package='SureTypeSCR')
#Load data
df=scbasic(manifest,cluster,samplesheet)
#create ggplot object with PCA
#df %>% plot_pca(by_chrom=TRUE,features=c('x','y'),labels=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.