cometh: The constructor function for CoMeth objects

Description Usage Arguments Value See Also

Description

This is the general function to construct a CoMeth object. Users will generally use the read.comethylation function to construct a CoMeth object. The constructor allows for multiple samples in the same object by passing most arguments as a *List where each element of the *List corresponds to the arguments for a given sample. These multiple samples will then be appropriately combined into a single CoMeth object.

Usage

1
2
3
4
CoMeth(sample_names = CharacterList(), methylation_type = CharacterList(),
  counts = DataFrameList(), seqnames = RleList(), pos = DataFrameList(),
  seqinfo = Seqinfo(), strand = RleList(), colData = DataFrame(),
  exptData = SimpleList(), ..., verbose = FALSE)

Arguments

sample_names

A CharacterList containing the names of the samples. Sample names must be unique.

methylation_type

A CharacterList storing the type of methylation loci for these m-tuples. methylation_type must be named and the names must match those given in sample_names. For each sample the possible values are "CG", "CHG", "CHH" or "CNN" or multiple values specified as a character vector, e.g. c("CG", "CHG") or c("CHG", "CG") for "CG/CHG" methylation. The methylation_type of the resulting CoMeth object is the union of this argument, e.g. if methylation_type = list('sample1' = 'CG', 'sample2' = 'CHH') then the methylation_type of the resulting CoMeth object is CG/CHH; this also gives a warning.

counts

A DataFrameList. counts must be named and the names must match those given in sample_names. The entries in each DataFrame corresponds to the number of times that particular co-methylation pattern (columns) was observed for that particular m-tuple (rows). Therefore, each DataFrame must have the same number of rows as its corresponding DataFrame in pos and have 2 ^ \code{m} columns. All samples must have the same m, that is, all DataFrames in counts must have the same number of columns. The column names of each DataFrame must match those given by .make_m_tuple_names(m).

seqnames

a RleList. seqnames must be named and the names must match those given in sample_names. Each Rle is the seqnames of each m-tuple for that sample.

pos

A DataFrameList. pos must be named and the names must match those given in sample_names. The columns of each DataFrame must be: seqnames, pos1, ..., posm, where, for example, posm is pos3 if m = 3. Therefore, the number of columns of each DataFrame is m, the size of the m-tuples, and the number of rows is equal to the number of m-tuples for that particular sample. All samples must have the same m, that is, all DataFrames in pos must have the same number of columns.

seqinfo

A Seqinfo object containing information about the reference genome of the samples. Only a single value is accepted because all samples must be mapped against the same reference genome. However, multiple genomes per sample are allowed in order to accommodate a spiked-in unmethylated genome (normally lambda phage), which is a common step in a bisulfite-sequencing protocol. NOTE: seqinfo is a required argument in order to construct a CoMeth object, whereas for many Bioconductor objects it is an optional argument.

strand

An optional RleList object containing the strand information of each m-tuple. WARNING: If strand is not supplied, all m-tuples in the resulting CoMeth object will have their strand set to * to signify that the strand is unknown or irrelevant. WARNING: m-tuples will not be combined across samples if they are on different strands.

colData

An optional DataFrame describing the samples. Row names must match the sample_names, otherwise an error is returned. sample_names.

exptData

An optional SimpleList of arbitrary content describing the overall experiment.

...

Additional arguments passed to the internal call to the MTuples constructor. See MTuples for details on what these might be.

verbose

A logical(1) indicating whether messages about data coercion during construction should be printed.

Value

A CoMeth1 (if m = 1), CoMeth2 (if m = 2) or CoMeth3Plus (if m >= 3) object. All these are concrete subclasses of the VIRTUAL CoMeth class.

cat("TODO")

See Also

read.comethylation for a function to read in the .tsv output file of comethylation and construct a CoMeth object.

SummarizedExperiment for the class that CoMeth extends.


PeteHaitch/cometh documentation built on May 8, 2019, 1:32 a.m.