meffil.read.samplesheet: Function to read Illumina "Sample Sheet" adapted from...

View source: R/read-samplesheet.r

meffil.read.samplesheetR Documentation

Function to read Illumina "Sample Sheet" adapted from read.450k.sheet in R/minfi

Description

Reading an Illumina methylation sample sheet, containing pheno-data information for the samples in an experiment.

Usage

meffil.read.samplesheet(
  base,
  pattern = "csv$",
  ignore.case = TRUE,
  recursive = TRUE,
  verbose = TRUE
)

Arguments

base

The base directory from which the search is started.

pattern

= "csv$" What pattern is used to identify a sample sheet file, see list.files

ignore.case

= TRUE Should the file search be case sensitive?

recursive

= TRUE Should the file search be recursive, see list.files?

verbose

= TRUE Should the function be verbose?

basenames

Output from meffil.basenames

Details

This function search the directory base (possibly including subdirectories depending on the argument recursive for “sample sheet” files (see below). These files are identified solely on the base of their filename given by the arguments pattern and ignore.case (note the use of a dollarsign to mean end of file name).#'

In case multiple sheet files are found, they are all read and the return object will contain the concatenation of the files.

A sample sheet file is essentially a CSV (comma-separated) file containing one line per sample, with a number of columns describing pheno-data or other important information about the sample. The file may contain a header, in which case it is assumed that all lines up to and including a line starting with \[Data\] should be dropped. This is modelled after a sample sheet file Illumina provides. It is also very similar to the targets file made used by the popular limma package (see the extensive package vignette).#'

An attempt at guessing the file path to the IDAT files represented in the sheet is made. This should be doublechecked and might need to manually changed.

Value

A data.frame containing the columns of all the sample sheets. As described in details, a column named Sentrix_Position is renamed to Array and Sentrix_ID is renamed to Slide. In addition the data.frame will contain a column named Basename.


perishky/meffil documentation built on June 9, 2024, 5:59 p.m.