View source: R/treecor_samplepcaplot.R
treecor_samplepcaplot | R Documentation |
Sample PCA plot
treecor_samplepcaplot(
sample_meta,
pca_matrix,
response_variable,
analysis_type = "cancor",
num_permutations = 1000,
alternative = "two.sided",
row_variable = NULL,
col_variable = NULL,
font_size = 15,
point_size = 1,
point_shape = 19,
point_alpha = 1,
line_type = "dashed",
line_color = "black"
)
sample_meta |
Sample-level metadata. Must contain |
pca_matrix |
PCA matrix with sample names on the rows and PC coordinates on the columns (e.g. PC1 and PC2). |
response_variable |
A univariate phenotype. If multivariate phenotype is provided, either convert them to a univariate combined phenotype (e.g. using weight or PCA) or call this function separately for each outcome. |
analysis_type |
Specify summary statistic, can be one of 'cancor' (default) or 'regression'. |
num_permutations |
Number of permutations. Default is 1000. |
alternative |
Specify alternative hypothesis. Must be one of 'two.sided' (default) or 'less' or 'greater'. |
row_variable |
Specify variable for row. Must be categorical variable (e.g. 'factor' or 'character' class). |
col_variable |
Specify variable for column (optional). Must be categorical variable (e.g. 'factor' or 'character' class). |
font_size |
Font size. Default is 15. |
point_size |
Set point size. Default is 0.1. |
point_shape |
Set point shape. Default is 19. |
point_alpha |
Set point transparency. Default is 1. |
line_type |
Set line type as 'dashed' (default) or 'solid' or others. |
line_color |
Set optimal axis line color. |
Sample pca plot.
Boyang Zhang <bzhang34@jhu.edu>, Hongkai Ji
treecor_samplepcaplot(sample_meta, pca_matrix, response_variable = 'severity', row_variable = 'severity')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.