magpa: Multivariate Analysis of Genotype–Phenotype Association

Description Usage Arguments Value Examples

View source: R/magpa.R

Description

the function is performed multivariate analysis of genotype–phenotype association based on CCA, which calls cca in the **yacca** package to do canonical correlation analysis.

Usage

1
magpa(geno, pheno, pca = FALSE, rm.na = TRUE)

Arguments

geno

string; a file prefix name of plink output (.bed, .bim, .fam), list; an object read by read.plink of the **snpStats** package, or a SnpMatrix

pheno

a matrix with n rows of sample and m columns of features

pca

boolean. perform principal component analysis on the phenotype? the default is FALSE

rm.na

boolean. remove missing values during analysis? the default is TRUE

Value

A matrix included SNP, CHR, position, MAF, canonical correlation, chisq, and pvalue.

Examples

1
2
3
4
data(geno)
data(pheno)
gpa<-magpa(geno,pheno,pca = TRUE)
head(gpa)

changebio/MAGPA documentation built on June 15, 2020, 9:26 p.m.