gpatterns.get_bg_meth: Get background trend expected methylation signal

View source: R/cluster.R

gpatterns.get_bg_methR Documentation

Get background trend expected methylation signal

Description

Calculate the expected average methylation given the background (CpG content driven) trend.

Usage

gpatterns.get_bg_meth(
  intervals,
  tracks = NULL,
  trend = NULL,
  cg_cont_track = .gpatterns.cg_cont_500_track,
  cg_cont_breaks = seq(0, 0.15, by = 0.002),
  ...
)

Arguments

intervals

genomic scope for which the function is applied

tracks

gpatterns tracks

trend

pre-computed global methylation trend (output of gpatterns.global_meth_trend).

cg_cont_track

CpG content track

cg_cont_breaks

breaks to determine the bins of cg_cont_track

...

Arguments passed on to gpatterns.global_meth_trend

strat_track

track to stratify average methylation by. default is CG content

strat_breaks

breaks to determine the bins of strat_track

iterator

track expression iterator (of both tracks and strat_track)

min_cov

minimal coverage of each track

min_cgs

minimal number of CpGs per bin

names

alternative names for the track

groups

a vector the same length of tracks with group for each track. Each group will on a different facet.

group_name

name of the grouping variable (e.g. tumor, sample, patient, experiment)

include.lowest

if 'TRUE', the lowest value of the range determined by breaks is included

ncol

number of columns

nrow

number of rows

width

plot width (if fig_fn is not NULL)

height

plot height (if fig_fn is not NULL)

fig_fn

output filename for the figure (if NULL, figure would be returned)

xlab

label for the x axis

ylim

ylim of the plot

title

title for the plot

legend

add legend

colors

custom colors

parallel

get trends parallely

Value

intervals set with the additional fields 'exp_meth' 'exp_cov' and 'exp_avg' with the expected methylation calls, coverage and average methylation (respectively)


tanaylab/gpatterns documentation built on May 15, 2023, 6:23 p.m.