Function aggregate_probes aggregates CpG probes to corresponding genes.

aggregate_probes(data, keep = NULL,
  genom.data = MLExpResso::illumina_humanmethylation_27_data,
  genes.col = 11, probes.col = 1)

Arguments

data

Data frame containing methylation values for CpG probes. Columns correspond to probes, rows to samples.

keep

The name of the column or vector of columns names we want to keep.

genom.data

#' @param genom.data Data frame which contains information about CpG probes and corresponding genes, by default in our package we use illumina_humanmethylation_27_data. New dataset should contain 5 columns with: 1) CpG probe names, 2) CpG probe locations, 3) gene names, 4) logical value if there is a CpG island, 5) location of island.

genes.col

Number of column in genom.data containing informations about genes (genes symbols).

probes.col

Number of column in genom.data containing informations about probes (probes symbols).

Value

A data frame with CpG probes aggregated to genes. If there were more than one probe corresponding to a gene, value is a mean of those probes.

Examples

# NOT RUN { library(MLExpRessoData) BRCA_genes <- aggregate_probes(BRCA_methylation_all, keep="SUBTYPE") # }