read.vcf2list: Read data of a vcf-file to a matrix

Description Usage Arguments Value Author(s) See Also Examples

Description

Function for easily read genomic data in vcf-Format to a list, which contains the map information and the marker information.

Usage

1
read.vcf2list(file, FORMAT = "GT", coding = c("allele", "ref"), IDinRow = TRUE, cores=1)

Arguments

file

character. The name of the file which the data are to be read from.

FORMAT

character. The default is "GT". If there are more formats in your vcf-file you can decide which one you like to have in your output matrix.

coding

This option has only an effect with FORMAT="GT". allele gives you back the alles as defined as REF and ALT in your vcf-file. ref gives you back "0" for the reference allele and "1" for the alternative allele.

IDinRow

logical. Default is TRUE, this means the genotypes are in the rows and the markers in the column. For FALSE it is the other way round.

cores

numeric. Specifies the number of cores for parallel computing.

Value

A list with a matrix (matrix) containing a representation of the genotypic data in the file and a map of classes GenMap and data.frame.

Author(s)

Hans-Juergen Auinger

See Also

write.vcf, read.vcf2matrix

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(synbreedData)
data(maize)
maize$info$map.unit <- "kb"
maize <- codeGeno(maize)
write.vcf(maize, "maize.vcf")
genInfo <- read.vcf2list("maize.vcf")

## End(Not run)

synbreed documentation built on May 2, 2019, 3:23 a.m.