postHoc: Perform Post Hoc Inference

View source: R/postHoc.R

postHocR Documentation

Perform Post Hoc Inference

Description

This function performs post-hoc inference on all provided clusters using performTest results.

Usage

postHoc(resdiff, clusters, alpha, fill = FALSE, stepDown = TRUE)

## S3 method for class 'resposthoc'
print(x, ...)

## S3 method for class 'resposthoc'
summary(object, ...)

## S3 method for class 'resposthoc'
plot(x, ...)

Arguments

resdiff

An object of class resdiff obtained from the function performTest.

clusters

A vector corresponding to a clustering of resdiff rows.

alpha

A number between 0 and 1 at which the computed post hoc bounds will be valid.

fill

A boolean value. If TRUE (the default), enforce the total number of tests to be p*(p+1)/2 by adding ones to the p-value vector for non tested entries.

stepDown

A boolean value. If FALSE, the single step Simes method is used. If TRUE (the default), the step-down Simes method is used. The latter is more powerful when the signal is strong.

x

a resposthoc object to plot

...

not used

object

a resposthoc object to summarize

Value

An object of class resposthoc containing a matrix with true positive proportions for each interaction and a dataframe with the following entries:

region1

The first bin of the interaction.

region2

The second bin of the interaction.

clust

The cluster the interaction belongs to.

TDP

The minimal post hoc true discovery (positive) proportion of the cluster the interaction belongs to.

p.value

The p-value of the diffHic test.

p.adj

The adjusted p-value of the diffHic test.

logFC

The log2-fold-change of the interaction.

meanlogFC

The mean of the log2-fold-change for the cluster the interaction belongs to.

varlogFC

The variance of the log2-fold-change for the cluster the interaction belongs to.

propPoslogFC

The proportion of interactions with positive log2-fold-change in the cluster the interaction belongs to.

triangleScore

Score indicating how similar the cluster shape is to a triangle, computed as npixels/((nbins**2)/2).

stripeScore

Score indicating how similar the cluster shape is to a stripe, computed as log(iproj/jproj) where iproj (resp. jproj) corresponds to the size of leftmost (resp. rightmost) genomic projection, which is the number of distinct region1 (resp. region2) bins involved.

Author(s)

Élise Jorge elise.jorge@inrae.fr
Sylvain Foissac sylvain.foissac@inrae.fr
Toby Dylan Hocking toby.hocking@r-project.org
Pierre Neuvial pierre.neuvial@math.univ-toulouse.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr

Examples

data("pighic")
resdiff <- performTest(pighic$data, pighic$conditions)
res2D <- AggloClust2D(pighic$data)
if (!is.null(res2D)) { # in case Python or modules are not available
  clusters <- res2D$clustering
  alpha <- 0.05
  resposthoc <- postHoc(resdiff, clusters, alpha)
  resposthoc
  summary(resposthoc)
  plot(resposthoc)
}

hicream documentation built on Nov. 27, 2026, 1:07 a.m.