ChIPseeker icon indicating copy to clipboard operation
ChIPseeker copied to clipboard

tagMatrix upstream and downstream should be actual number error

Open tiagochst opened this issue 3 years ago • 1 comments

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)
Screen Shot 2022-01-05 at 11 57 41 AM

tiagochst avatar Jan 05 '22 16:01 tiagochst

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.

MingLi-929 avatar Jan 06 '22 04:01 MingLi-929