conformation_network: Build Network from Conformation Peaks.

Description Usage Arguments Value Author(s) Examples

View source: R/conformation_network.R

Description

Build network from conformation, e.g. HiChIP records.

Usage

1
2
3
4
5
6
7
8
9
conformation_network(
  table,
  promoter,
  pfm,
  genome,
  range = 500,
  p.cutoff = 5e-05,
  w = 7
)

Arguments

table

(data.frame) Records, with "Chr1", "Position1", "Strand1", "Chr2", "Position2" and "Strand2" in column name, and record ID in row names.

promoter

(GRanges) Promoter regions.

pfm

(PFMatrixList) Positon Frequency Matrices (PFMs) of regulators.

genome

(BSgenome or character) Genome build in which regulator motifs will be searched.

range

(numeric) Search radius from "Position1" and "Position2" for promoters.

p.cutoff

(numeric) P-value cutoff for motifs searching within peaks for TF identificaton.

w

(numeric) Window size for motifs searching within peaks for TF identificaton.

Value

(data.frame) Network, with "reg" and "target" in column name.

Author(s)

DING, HONGXU (hd2326@columbia.edu)

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
table <- data.frame(Chr1=c("chr1", "chr1"),
                    Position1=c(569265, 713603),
                    Strand1=c("+", "+"),
                    Chr2=c("chr4", "chr1"),
                    Position2=c(206628, 715110),
                    Strand2=c("+", "-"),
                    row.names=c("A", "B"), stringsAsFactors=FALSE)
regulators=c("FOXF2", "MZF1")
#peaks and regulators to be analyzed

library(GenomicRanges)
library(GenomicFeatures)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(org.Hs.eg.db)
library(annotate)
promoter <- promoters(genes(TxDb.Hsapiens.UCSC.hg19.knownGene))
names(promoter) <- getSYMBOL(names(promoter), data="org.Hs.eg")
promoter <- promoter[!is.na(names(promoter))]
#get promoter regions

library(JASPAR2018)
library(TFBSTools)
library(motifmatchr)
pfm <- getMatrixSet(JASPAR2018, list(species="Homo sapiens"))
pfm <- pfm[unlist(lapply(pfm, function(x) name(x))) %in% regulators]
#get regulator position frequency matrix (PFM) list

library(BSgenome.Hsapiens.UCSC.hg19)
conformation_network(table, promoter, pfm, "BSgenome.Hsapiens.UCSC.hg19")

pageRank documentation built on Nov. 8, 2020, 6:52 p.m.