plot_peakGeneCor: plot_peakGeneCor

View source: R/peakGeneCor_parse.R

plot_peakGeneCorR Documentation

plot_peakGeneCor

Description

plot_peakGeneCor

Usage

plot_peakGeneCor(
  mmAnnoCor,
  select_gene,
  addLine = TRUE,
  addFullInfo = TRUE,
  sigShow = c("pvalue", "padj", "qvalue")
)

Arguments

mmAnnoCor

the annotated GRange object from peakGeneCor or enhancerPromoterCor

select_gene

a gene_id which you want to show

addLine

whether add cor line

addFullInfo

whether add full feature info on plot

sigShow

one of 'pvalue' 'padj' 'qvalue'

Value

ggplot2 object

Examples


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

    ATAC_colData <- data.frame(
        row.names = colnames(ATAC_normCount),
        type = gsub("_R[0-9]", "", colnames(ATAC_normCount))
    )

    integrate_replicates(ATAC_normCount, ATAC_colData) -> ATAC_normCount_merge
    RNA_colData <- data.frame(
        row.names = colnames(RNA_normCount),
        type = gsub("_R[0-9]", "", colnames(RNA_normCount))
    )
    integrate_replicates(RNA_normCount, RNA_colData) -> RNA_normCount_merge
    mmAnnoCor <- peakGeneCor(
        mmAnno = mmAnno,
        peakScoreMt = ATAC_normCount_merge,
        geneScoreMt = RNA_normCount_merge,
        parallel = FALSE
    )

    plot_peakGeneCor(mmAnnoCor, select_gene = "AT5G01010")

}

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