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.
predLoops(gi, formula = NULL, betas = NULL, colname = "pred", cutoff = get("cutoffBest10"))
gi | A |
---|---|
formula | A |
betas | A vector with parameter estimates for predictor variables. They
should be in the same order as variables in |
colname | A |
cutoff | Numeric cutoff on prediction score. Only interactions with
interaction probability >= |
A GInteractions
as gi
with an
additional metadata column holding the predicted looping probability.
# 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)