Skip to contents

This function is useful for loading Illumina methylation data into a [MethyLumiSet-class] object. Sample information can be supplied and will then be incorporated into the resulting phenoData slot.

Usage

methylumiR(filename, qcfile = NULL, sampleDescriptions = NULL, sep = NULL, ...)

Arguments

filename

A filename of the excel-like file from BeadStudio.

qcfile

A filename of the excel-like QC file from BeadStudio.

sampleDescriptions

A data.frame that contains at least one column, SampleID (case insensitive). This column MUST match the part of the column headers before the `.Avg_Beta`, etc. Also, if a column called SampleLabel (case insensitive) is present, it is used for sample labels, IF that column contains unique identifiers.

sep

Separator used in the BeadStudio (or GenomeStudio) output file. If `NULL`, the function estimates it automatically.

...

Passed into [utils::read.delim()].

Value

A [MethyLumiSet-class] object.

Details

Autodetects the file format, reads the data, makes substitutions of assayData element names for the various formats so that the method accessors will work, maps `sampleDescriptions` appropriately, and returns a `MethyLumiSet` object.

See also

[MethyLumiSet-class], [MethyLumiQC-class]

Author

Sean Davis <seandavi@gmail.com>

Examples

## Read in sample information
samps <- read.table(system.file("extdata/samples.txt",
                                package = "methylumi"), sep = "\t", header = TRUE)
## Perform the actual data reading
## This is an example of reading data from an
## Sentrix Array format file (actually two files,
## one for data and one for QC probes)
mldat <- methylumiR(system.file('extdata/exampledata.samples.txt', package = 'methylumi'),
                    qcfile = system.file('extdata/exampledata.controls.txt', package = "methylumi"),
                    sampleDescriptions = samps)
mldat
#> 
#> Object Information:
#> MethyLumiSet (storageMode: lockedEnvironment)
#> assayData: 1536 features, 10 samples 
#>   element names: Avg_NBEADS, BEAD_STDERR, betas, methylated, pvals, unmethylated 
#> protocolData: none
#> phenoData
#>   sampleNames: M_1 M_2 ... F_10 (10 total)
#>   varLabels: sampleID SampleLabel Sample Gender
#>   varMetadata: labelDescription
#> featureData
#>   featureNames: AATK_E63_R AATK_P519_R ... ZP3_P220_F (1536 total)
#>   fvarLabels: TargetID ProbeID ... PRODUCT (17 total)
#>   fvarMetadata: labelDescription
#> experimentData: use 'experimentData(object)'
#> Annotation:  
#> Major Operation History:
#>                    submitted                   finished
#> 1 2026-10-16 15:00:59.332941 2026-10-16 15:00:59.461562
#>                                                                                                                                                                                                             command
#> 1 methylumiR(filename = system.file("extdata/exampledata.samples.txt",     package = "methylumi"), qcfile = system.file("extdata/exampledata.controls.txt",     package = "methylumi"), sampleDescriptions = samps)