projectSample2PCA: Project patients onto existing principal component axes (PCA)

View source: R/processStudy.R

projectSample2PCAR Documentation

Project patients onto existing principal component axes (PCA)

Description

This function calculates the patient eigenvectors using the specified SNP loadings.

Usage

projectSample2PCA(gds, listPCA, sample.current, np = 1L)

Arguments

gds

an object of class SNPRelate::SNPGDSFileClass, a SNP GDS file.

listPCA

a list containing two objects pca.unrel -> snpgdsPCAClass and a snp.load -> snpgdsPCASNPLoading

sample.current

a character string representing the identifiant of the sample to be projected in the PCA.

np

a single positive integer representing the number of threads. Default: 1L.

Details

More information about the method used to calculate the patient eigenvectors can be found at the Bioconductor SNPRelate website: https://bioconductor.org/packages/SNPRelate/

Value

a snpgdsPCAClass object, a list that contains:

  • sample.id the sample ids used in the analysis

  • snp.id the SNP ids used in the analysis

  • eigenvalues eigenvalues

  • eigenvect eigenvactors, “# of samples” x “eigen.cnt”

  • TraceXTX the trace of the genetic covariance matrix

  • Bayesian whether use bayerisan normalization

Author(s)

Pascal Belleau, Astrid Deschênes and Alexander Krasnitz

Examples


## Path to the demo pedigree file is located in this package
data.dir <- system.file("extdata", "RAIDS")

## TODO


belleau/aicsPaper documentation built on Aug. 4, 2022, 1:12 a.m.