Search
Question: "input object should be a named list" error in ChIPseeker
0
gravatar for k.panov
8 months ago by
k.panov0
k.panov0 wrote:

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)
ADD COMMENTlink modified 8 months ago by Guangchuang Yu1.1k • written 8 months ago by k.panov0
0
gravatar for Guangchuang Yu
8 months ago by
Guangchuang Yu1.1k
China/Guangzhou/Southern Medical University
Guangchuang Yu1.1k wrote:

set the names of peakAnnoList, e.g.


names(peakAnnoList) <- basename(files)
ADD COMMENTlink written 8 months ago by Guangchuang Yu1.1k

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

Best regards

Konstantin

ADD REPLYlink written 8 months ago by k.panov0

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 REPLYlink written 8 months ago by Guangchuang Yu1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 246 users visited in the last hour