"input object should be a named list" error in ChIPseeker
1
0
Entering edit mode
k.panov • 0
@kpanov-15226
Last seen 3 months ago
United Kingdom

Hello,

I am analyzing two MACS2 bed files using ChIPseeker. Individual analysis is OK, but I'm getting an error message for simultaneous analysis of two files when using following ChIPSeeker functions: plotAnnoBar, plotDistToTSS and vennplot. All error messages are similar: Error in XXXX (peakAnnoList) :input object should be a named list (see example below). However, it all works for test files (provided with ChIPseeker) (see example below)

Any advice?

Best regards

Konstantin


> peakAnnoList <- lapply(files, annotatePeak, TxDb=txdb,

+                        tssRegion=c(-3000, 3000), verbose=FALSE)

> plotAnnoBar(peakAnnoList)

Error in plotAnnoBar(peakAnnoList) :

  input object should be a named list...

> plotDistToTSS(peakAnnoList)

Error in plotDistToTSS(peakAnnoList) :

  input object should be a named list...

> genes= lapply(peakAnnoList, function(i) as.data.frame(i)$geneId)

> vennplot(genes)

Error in vennplot(genes) : input object should be a named list...

> files <- getSampleFiles()
> peakAnnoList <- lapply(files, annotatePeak, TxDb=txdb,
+                        tssRegion=c(-3000, 3000), verbose=FALSE)
> plotAnnoBar(peakAnnoList)
> plotDistToTSS(peakAnnoList)
> genes= lapply(peakAnnoList, function(i) as.data.frame(i)$geneId)
> vennplot(genes)
ChIPseeker named list error plotAnnoBar plotDistToTSS vennplot • 2.4k views
ADD COMMENT
0
Entering edit mode
Guangchuang Yu ★ 1.2k
@guangchuang-yu-5419
Last seen 8 weeks ago
China/Guangzhou/Southern Medical Univer…

set the names of peakAnnoList, e.g.


names(peakAnnoList) <- basename(files)
ADD COMMENT
0
Entering edit mode

Cool, it works now! Thank you very much. Could I suggest to add this into ChIPseeker manual?

Best regards

Konstantin

ADD REPLY
0
Entering edit mode

thanks for the recommendation.

 

In next release, it will throw warning msg (instead of error) that the input should be a named list and set the named automatically.

ADD REPLY

Login before adding your answer.

Traffic: 365 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