toArray: Turn Illumina's Genome Studio 'Final Report' file into an...

Description Usage Arguments Details Value See Also Examples

View source: R/dataEdit.R

Description

toArray is a function to turn genotyping data into an array. This function does not read stored data in the ‘Final Report’ file, however, it converts a data fram with the same structure as ‘Final Report’ into an object of class matrix. The specifications of the genotyping data frame are given under ‘Details’.

Usage

1
toArray(finalRep)

Arguments

finalRep

A data frame with the same structure as ‘Final Report’, containing genotyping data. Specifications are given under ‘Details’.

Details

Used to turn Illumina's Genome Studio ‘Final Report’ file into an array. Specifications of the input data fram, ‘finalRep’, are:

Note that it is easy to read the ‘Final Report’ file into a data frame which is then used as an input to toArray. See ‘Examples’.

Value

An object of class matrix with ‘number of rows = number of individuals’ and ‘number of columns = number of SNPs’. Each element of the matrix consists of a two-character string for the two DNA bases of a single SNP locus.

See Also

arrayAppend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Read file './Final.Report', located in the current working directory,
## and place the first 4 columns in a data frame.

#d <- read.table("./Final.Report", skip=10)[,1:4]

## Use toArray to turn data read into a matrix

#ga <- toArray(finalRep = d)
#ga[1:6, 4000:4002]

#
#               SNP.4000           SNP.4001           SNP.4002
#Individual.1       "GG"               "CC"               "CC"
#Individual.2       "TG"               "AC"               "CC"
#Individual.3       "TG"               "AA"               "CC"
#Individual.4       "GG"               "AC"               "TC"
#Individual.5       "GG"               "AC"               "CC"
#Individual.6       "GG"               "AA"               "CC"
#

gdmp documentation built on May 1, 2019, 8:07 p.m.

Related to toArray in gdmp...