predLoops: Predict looping interactions.

Description Usage Arguments Value See Also Examples

Description

This function takes a GInteractions object with candidate looping interactions. It should be annotated with features in metadata columns. A logistic regression model is applied to predict looping interaction probabilities.

Usage

1
2
predLoops(gi, formula = NULL, betas = NULL, colname = "pred",
  cutoff = get("cutoffBest10"))

Arguments

gi

A GInteractions object with coverage correlation and genomic features in metadata columns. See prepareCisPairs and addCor to build it.

formula

A formula. All predictor variables should be available in the in metadata columns of gi. If NULL, the following default formula is used: ~ dist + strandOrientation + score_min + chip.

betas

A vector with parameter estimates for predictor variables. They should be in the same order as variables in formula. Per default estimates of modelBest10Avg are used. See ?modelBest10Avg for more detailed information on each parameter.

colname

A character as column name of new metadata column in gi for predictions.

cutoff

Numeric cutoff on prediction score. Only interactions with interaction probability >= cutoff are reported. If NULL, all input interactions are reported. Default is cutoffBest10, an optimal cutoff based on F1-score on 10 best performing transcription factor ChIP-seq data sets. See ?cutoffBest10 for more details.

Value

A GInteractions as gi with an additional metadata column holding the predicted looping probability.

See Also

prepareCisPairs, addCor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# use example CTCF moitf location on human chromosome 22 with chip coverage
motifGR <- sevenC::motif.hg19.CTCF.chr22.cov

# build candidate interactions
gi <- prepareCisPairs(motifGR)

# add ChIP-seq signals correlation
gi <- addCovCor(gi)

# predict chromatin looping interactions
loops <- predLoops(gi)

# add prediction score for all candidates without filter
gi <- predLoops(gi, cutof = NULL)

# add prediction score using custom column name
gi <- predLoops(gi, cutof = NULL, colname = "my_colname")

# Filter loop predictions on custom cutoff
loops <- predLoops(gi, cutoff = 0.4)

# predict chromatin looping interactions using custom model parameters
myParams <- c(-4, -5, -2, -1, -1, 5, 3)
loops <- predLoops(gi, betas = myParams)

# predict chromatin loops using custom model formula and params
myFormula <- ~ dist + score_min
# define parameters for intercept, dist and motif_min
myParams <- c(-5, -4, 6)
loops <- predLoops(gi, formula = myFormula, betas = myParams)

ibn-salem/chromloop documentation built on May 18, 2019, 1:29 a.m.