Deleted:Obtain the GenomicRanges from segmented CNA data and the corresponding TSS for EnrichedPlot
0
0
Entering edit mode
11 weeks ago

I want to plot the EnrichedHeatmap using the GenomicRanges of my CNA data. The normalizeToMatrix function returned mat1, which is filled with 0, resulting in Error: You should have at least two distinct break values. when I try to plot it.

library(EnrichedHeatmap)
library(GenomicRanges)
library(data.table)
library(ChIPseeker)
library(tibble)
library(AnnotationHub)
library(IlluminaHumanMethylation450kanno.ilmn12.hg19)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)

txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
hub <- AnnotationHub()
hub <- subset(hub, species == "Homo sapiens")


# Gene GRanges
kirp.seg <- kipan.seg[kipan.seg$Sample %in% colnames(exp),]
colnames(kirp.seg) <- c("sample","chrom","start","end")
genes <- makeGRangesFromDataFrame(kirp.seg, keep.extra.columns=TRUE)

# TSS
tss <- promoters(genes, upstream = 2000, downstream = 2000)

# H3K27me3
H3K27me3.query <- query(hub, c("H3K27me3","hg19", "EpigenomeRoadMap", "broadPeak", "chip", "consolidated", "Kidney"))
H3K27me3 <- H3K27me3.query[["AH29489"]]

The mat1 dataframe seems to be filled with 0s, which results in the following error.

mat1 = normalizeToMatrix(H3K4me3, tss, extend = 100000)
EnrichedHeatmap(mat1, name="H3K4me3", col = c("white","red"))

Traceback:

Error: You should have at least two distinct break values.

Data:

> genes
GRanges object with 83715 ranges and 1 metadata column:
         seqnames            ranges strand |           sample
            <Rle>         <IRanges>  <Rle> |      <character>
  546793        1    61735-72768916      * | TCGA.2K.A9WE.01A
  546794        1 72768936-72788725      * | TCGA.2K.A9WE.01A
  546795        1 72788844-72811148      * | TCGA.2K.A9WE.01A
  546796        1 72811904-75269284      * | TCGA.2K.A9WE.01A
  546797        1 75271072-75273866      * | TCGA.2K.A9WE.01A
     ...      ...               ...    ... .              ...
  847097       24   2650438-9633865      * | TCGA.Y8.A8S1.01A
  847098       24   9648550-9648739      * | TCGA.Y8.A8S1.01A
  847099       24  9651430-22214505      * | TCGA.Y8.A8S1.01A
  847100       24 22216828-22489357      * | TCGA.Y8.A8S1.01A
  847101       24 22514968-59018259      * | TCGA.Y8.A8S1.01A
  -------
  seqinfo: 24 sequences from an unspecified genome; no seqlengths
TSS GRanges EnrichedPlot promoters GenomicRanges • 166 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2141 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6