probetogene: Summarize the methylation beta values of probes to genes

View source: R/interaction.R

probetogeneR Documentation

Summarize the methylation beta values of probes to genes

Description

Summarize the methylation beta values of probes to genes by averaging the probes located closely to the TSS of a gene.

Usage

probetogene(
  betadat,
  platform = "450K",
  range27k = 200,
  group450k850k = "TSS200",
  includemultimatch = FALSE
)

Arguments

betadat

A matrix recording the beta values of methylation probes for samples. Each column represents one sample and each row represents one probe. The row names are the probe names while the column names should be sample IDs.

platform

The platform of the probes. Can be set as "27K", "450K", or "EPIC". Default is "450K".

range27k

A positive number or a vector with two positive numbers. If the data is from 27K platform, this parameter is needed to define which probes should be considered as related to a specific gene, and only the ones with a distance to the TSS of a gene less than the maximum value and greater than the minimum value of range27k will be considered as related to the gene, and the beta values of these probes will be averaged to get the gene beta value. If it is a single number, the probes with a distance less than this number and greater than 0 will be attributed to a gene. Default is 200.

group450k850k

A vector or single string. If the data is based on 450K or EPIC platform, this parameter is needed to define which probes could be considered as related to a specific gene. Only the ones located in the gene regions included in this parameter will be considered as belong to the gene. The value of this parameter need to be selected from "TSS200", "TSS1500", "1stExon", "5'UTR", '3'UTR", and "Body". If it is a vector, such as c("TSS200", "TSS1500", "1stExon"), the probes within these 3 regions of a gene will be attributed to the gene and their beta values will be averaged to get the gene beta value. Default value is the string "TSS200".

includemultimatch

Some probes can be attributed to multiple genes. If this parameter is TRUE, these probes will be involved into the beta value calculation for all their related genes. Otherwise, these probes will be discarded, so that the beta values of all the genes are averaged only from their uniquely related probes. Default is FALSE.

Value

A matrix recording the summarized gene beta values for samples.


yuabrahamliu/scDeconv documentation built on March 28, 2024, 3:15 p.m.