read_intensities: Read multiple idat files.

Description Usage Arguments Value Examples

Description

This function is a wrapper to for illuminaio's readIDAT function. A dictionary will translate the standard IDs from the IDAT file into SNP names. A position file, will filter out all SNPs where the position is unknown. This might save a lot of memory and allow to read in more samples at once. This function is provided to simplify the use of the example data. For data produced with other arrays use respective functions available in CRAN or Bioconductor.

Usage

1
2
read_intensities(files, dict = NULL, cnames = NULL, pos = NULL,
  beads = FALSE, sd = FALSE)

Arguments

files

A vector of filenames. Two consecutive lines per sample. The order (e.g. green,red) must be consistent for all samples.

dict

A dataframe with columns "idatID" and "name".

cnames

Vector of characters as column names.

pos

Position object with three columns "name", "chromosome" and "position". Can be used to filter out SNPs where the position is not known.

beads

Logical, if beads should be read in.

sd

Logical, if standard deviation should be read in.

Value

An object containing the identities from the idat files.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if(require(brassicaData)){
files <- list.files(system.file("extdata", package = "brassicaData"),
full.names = TRUE, pattern = "idat")
samples <- read_sample_sheets(files = list.files(system.file("extdata",
package = "brassicaData"), full.names = TRUE, pattern = "csv"))
column_names <- sapply(strsplit(files,split="/"), FUN=function(x) x[length(x)])
data("dictionary", package = "brassicaData", envir = environment())
data("chrPos", package = "brassicaData", envir = environment())
raw_data <- read_intensities(files = files, dict = dictionary,
cnames = column_names, pos = chrPos)
}

grafab/gsrc documentation built on May 17, 2019, 8:18 a.m.