readsnpweights: Read Snp Weights/Loadings from a file

Description Usage Arguments Value

View source: R/input.R

Description

Read SNP weights from a variety of formats (plink/flashpca, either regular or transposed)

Usage

1
2
3
4
5
6
7
readsnpweights(
  snpweightsfile,
  mode = "flashpca",
  transpose = FALSE,
  colnames = NULL,
  verbose = TRUE
)

Arguments

snpweightsfile

The file to read

mode

either flashpca or plink; default "flashpca"

transpose

default FALSE, meaning treat columns as PCs and rows as SNPs. if TRUE, assume the laoding file is transposed from this.

colnames

(default NULL, meaning do no naming) names for the SNPs' comes from

verbose

(default TRuE) whether to show progress for file reading

Value

a matrix of SNP weights with K rows and L columns


danjlawson/pcapred documentation built on Oct. 7, 2021, 3:47 p.m.