read.pcadapt {pcadapt}R Documentation

File Converter

Description

read.pcadapt converts genotype matrices or files to an appropriate format readable by pcadapt. For a file as input, you can choose to return either a matrix or convert it in bed/bim/fam files. For a matrix as input, this returns a matrix.

Usage

read.pcadapt(
  input,
  type = c("pcadapt", "lfmm", "vcf", "bed", "ped", "pool", "example"),
  type.out = c("bed", "matrix"),
  allele.sep = c("/", "|"),
  pop.sizes,
  ploidy,
  local.env,
  blocksize
)

Arguments

input

A genotype matrix or a character string specifying the name of the file to be converted. Matrices should use NAs to encode missing values. To encode missing values in 'pcadapt' and 'lfmm' files, 9s should be used.

type

A character string specifying the type of data to be converted from. Converters from 'vcf' and 'ped' formats are not maintained anymore; if you have any issue with those, please use PLINK >= 1.9 to convert them to the 'bed' format.

type.out

Either a bed file or a standard R matrix. If the input is a matrix, then the output is automatically a matrix (so that you don't need to specify this parameter). If the input is a bed file, then the output is also a bed file.

allele.sep

a vector of characters indicating what delimiters are used in VCF files. By default, only "|" and "/" are recognized. So, this argument is only useful for type = "vcf".

pop.sizes

deprecated argument.

ploidy

deprecated argument.

local.env

deprecated argument.

blocksize

deprecated argument.


[Package pcadapt version 4.3.5 Index]