read_sample_sheet: Read a sample sheet

Description Usage Arguments Details Value Methods (by class)

Description

Read a sample sheet and collate it with IDAT table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
read_sample_sheet(sample_sheet, idat_tbl)

## S4 method for signature 'character,IdatTable'
read_sample_sheet(sample_sheet, idat_tbl)

## S4 method for signature 'data.frame,IdatTable'
read_sample_sheet(sample_sheet, idat_tbl)

## S4 method for signature 'character,missing'
read_sample_sheet(sample_sheet, idat_tbl)

## S4 method for signature 'data.frame,missing'
read_sample_sheet(sample_sheet, idat_tbl)

Arguments

sample_sheet

A character scalar of sample sheet CSV file path, or a data.frame. See details for required fields.

idat_tbl

An IdatTable object

Details

If sample_sheet is a character scalar. It is a CSV file that can be read by read.csv() function. It has a similar format to the sample sheet that usually accompanies Illumina methylation array data. It should have the following columns at least: Sample_Name, Sample_Group, Sentrix_ID, Sentrix_Position. We use Sample_Group to describe if a sample is a tumor sample, a (matched) normal tissue control, or a control of other types. Additional columns are allowed. Sample_Name should be unique. The same requirement of columns are applied, if sample_sheet is a data.frame.

The function clone column Sentrix_ID to Slide, Sentrix_Position to Array to work with minfi. Then, it merges the sample sheet with the IDAT table through Slide and Array fields.

The returned value can be used by minfi::read.metharray.exp.

Note: If there are multiple records in IDAT table for a sample (usually because the slide is scanned more than once), get the latest versions of each sample by get_latest.

Value

A data frame that can be used by minfi::read.metharray.exp.

Methods (by class)


markgene/sjmat documentation built on April 26, 2018, 4:13 p.m.