makeTable: Create a Results Table

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/qsea.makeTable.R

Description

This function creates a table from the qsea objects qseaSet and qseaTvN_glm

Usage

1
2
3
makeTable(qs,glm,norm_methods="counts",samples,groupMeans, keep, ROIs,
    annotation, minPvalSummarize, CNV=FALSE, verbose=TRUE, minEnrichment=3,
    chunksize=1e5)

Arguments

qs

a qseaSet object (mandatory)

glm

a list of one or more qseaGLM objects (optional)

norm_methods

ether a character vector of pre-defined normalization combinations, or a list defining normalization combinations. This affects both individual and mean values.

samples

The indices of the samples for which individual values are to be written out in the specified order

groupMeans

a named list of indices vectors, defining groups for which mean values are to be written out

keep

a vector of indices of the windows that are considered (as created by isSignificant)

ROIs

A GRanges object, containing regions of interest (ROIs). Only windows overlapping ROIs are considered.

annotation

a named list of GRange objects, containing annotations (e.g. genes, CpG islands, ...) that are added to the table.

minPvalSummarize

If ROIs are given, you can specify a QseaTvN_glm object. For each ROI the window with the most significant differential coverage is written out

CNV

If set TRUE, the CNV logFC for the samples specified by samples are written out.

verbose

verbosity level

minEnrichment

for transformation to absolute methylation level, you can specify the minimal number of expected reads for a fully methylated window. This avoids inaccurate estimates, due to low enrichment.

chunksize

For efficient memory usage, the table is built up in chunks. With this parameter, the maximum number of windows processed in one chunk is specified.

Details

Note that, if overlapping ROIs are specified, windows might emerge in the table several times.

Value

A result table containing the specified normalized values for the selected windows and samples/groups

Author(s)

Mathias Lienhard

See Also

isSignificant

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#create example set
qs=getExampleQseaSet()
design=model.matrix(~group, getSampleTable(qs))
TvN_glm=fitNBglm(qs, design, norm_method="beta")
TvN_glm=addContrast(qs,TvN_glm, coef=2, name="TvN")
sig=isSignificant(TvN_glm, fdr_th=0.01)

##Table containing all significant windows
tab1=makeTable(qs=qs, glm=TvN_glm, 
    keep=sig, samples=getSampleNames(qs))
##additional CNV logFC for the selected samples
tab2=makeTable(qs=qs, glm=TvN_glm, 
    keep=sig, samples=getSampleNames(qs), CNV=TRUE)
##explicit selection of normalization: 
##counts (i.e. no normalization, only counts)
tab3=makeTable(qs=qs, glm=TvN_glm, keep=sig,
    samples=getSampleNames(qs), norm_method="counts")

##counts AND %methylation values for individual samples and group means
tab4=makeTable(qs=qs, glm=TvN_glm, keep=sig,
    samples=getSampleNames(qs), groupMeans=getSampleGroups(qs),
    norm_method=c("counts", "beta"))

qsea documentation built on Nov. 8, 2020, 8:28 p.m.