gcta_pca | R Documentation |
A wrapper for running GCTA's PCA.
gcta_pca(
name,
name_out = name,
n_pcs = 10,
gcta_bin = "gcta64",
threads = 0,
verbose = TRUE
)
name |
The shared name of the input binary GRM files without extensions. |
name_out |
The base name of the output eigenvec/eigenval files (default same as input |
n_pcs |
The number of eigenvectors/eigenvalues (a.k.a. principal components) to calculate. |
gcta_bin |
The path to the binary executable.
Default assumes |
threads |
The number of threads to use.
The values 0 (default), NA, or NULL use all threads available (the output of |
verbose |
If |
Nothing (the eigenvec/eigenval files are not read in; see example below for reading with a different function).
genio::read_eigenvec()
for reading eigenvec files.
delete_files_pca()
for deleting the eigenvec/eigenval outputs.
delete_files_log()
for deleting GCTA log files.
system3()
, used (with ret = FALSE
) for executing GCTA and error handling.
http://cnsgenomics.com/software/gcta/#PCA
## Not run:
# create PCs (on file)
gcta_pca( name, name_out )
# read file with genio
data <- genio::read_eigenvec( name_out )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.