Description Usage Arguments Details Value See Also Examples
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’.
1 | toArray(finalRep)
|
finalRep |
A data frame with the same structure as ‘Final Report’, containing genotyping data. Specifications are given under ‘Details’. |
Used to turn Illumina's Genome Studio ‘Final Report’ file into an array. Specifications of the input data fram, ‘finalRep’, are:
Input is a data frame with its first 4 columns listed in the following order:
SNP names, as factor, with equal number of SNPs per individual.
Identification codes, as factor, for genotyped individuals.
Allele 1 (one character: A, C, G, T, or -).
Allele 2 (one character: A, C, G, T, or -).
All SNPs of individual 1 are listed first followed by SNPs of individual 2, and so on.
SNPs are listed for each individual in the same order.
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’.
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.
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"
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.