integrate_ChIP_RNA: integrate_ChIP_RNA

View source: R/integrateInfo.R

integrate_ChIP_RNAR Documentation

integrate_ChIP_RNA

Description

integrate ChIP-Seq and RNA-Seq data to find TF target genes

Usage

integrate_ChIP_RNA(
  result_geneRP,
  result_geneDiff,
  lfc_threshold = 1,
  padj_threshold = 0.05
)

Arguments

result_geneRP

the simplify result from calcRP_TFHit(report_fullInfo = FALSE) or RP_df <- metadata(fullRP_hit)$peakRP_gene.

result_geneDiff

the result from RNA diff result with three column gene_id, log2FoldChange, padj

lfc_threshold

the threshold which decide significant genes

padj_threshold

the threshold which decide significant genes

Value

a ggplot object if having significant genes in your result. If not, it will report a data.frame with integrated info.

Examples

if (require(TxDb.Athaliana.BioMart.plantsmart28)) {
    data("RNADiff_LEC2_GR")
    Txdb <- TxDb.Athaliana.BioMart.plantsmart28
    seqlevels(Txdb) <- paste0("Chr", c(1:5, "M", "C"))
    peak_path <- system.file("extdata", "ChIP.bed.gz", package = "FindIT2")
    peak_GR <- loadPeakFile(peak_path)
    mmAnno <- mm_geneScan(peak_GR, Txdb)

    result_geneRP <- calcRP_TFHit(
        mmAnno = mmAnno,
        Txdb = Txdb
    )
    # output a plot
    merge_data <- integrate_ChIP_RNA(
        result_geneRP = result_geneRP,
        result_geneDiff = RNADiff_LEC2_GR
    )
    # if you want to extract merge target data
    target_data <- merge_data$data

}

shangguandong1996/FindIT2 documentation built on March 1, 2024, 8:34 p.m.