ChIPseeker
ChIPseeker copied to clipboard
tagMatrix upstream and downstream should be actual number error
If upstream and downstream are not in the attributes of the Granges, the arguments downstream
and upstream
are not working
https://github.com/YuLab-SMU/ChIPseeker/blob/0e597a539bcffd1105e032d73d7365f303d64a0c/R/tagMatrix.R#L201
library(ChIPseeker)
library(ChIPseeker)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(clusterProfiler)
package.version("ChIPseeker")
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
files <- getSampleFiles()
print(files)
peak <- readPeakFile(files[[4]])
peak
promoter <- getPromoters(TxDb=txdb, upstream=3000, downstream=3000)
attributes(promoter)$upstream <- NULL
attributes(promoter)$downstream <- NULL
tagMatrix <- getTagMatrix(peak, windows=promoter,downstream = 3000,upstream = 3000)

If upstream and downstream are not in the attributes of the Granges, the arguments downstream and upstream are not working
Definitely, it would not work. Because getPromoters()
and getTagMatrix()
worked in cooperation.
For the reason raised in the previous issue(#174), attributes were added to the output in order to simplify the input arguments. The only reason to do all the actions is to make the function friendly to users. So many arugments are attributed to the output in the funcions in ChIPseeker
.