jianhong / ChIPpeakAnno

11 stars 4 forks source link

Bug in annotatePeakInBatch (fix found): invalid class "DFrame" object: column names should not be NULL #5

Closed millerh1 closed 3 years ago

millerh1 commented 4 years ago

Hello -- I found a bug in annotatePeakInBatch when using a different annotation data from the one shown in the vignette. Here is my code:

> binOverFeature(BRCA2, annotationData = exons)
Error in validObject(result) : invalid class "DFrame" object: 
    column names should not be NULL
In addition: Warning message:
In annotatePeakInBatch(Peaks, AnnotationData = annotationData, output = "overlapping",  :
  Found duplicated names in myPeakList. 
                    Changing the peak names ...

I traced the issue to this line in annotatePeakInBatch:

subjectHits$output <- 
            dist[!is.na(dist$subjectHits),"output"]

The problem is fixed by changing this to:

mcols(subjectHits)$output <- 
            dist[!is.na(dist$subjectHits),"output"]
jianhong commented 4 years ago

Hi Miller,

Thank you for reporting. Could you share your sessionInfo() of this bug? The subjectHits should be GenomicRanges Object and the method $ is overwright of mcols(obj)[[name]]. I am double check if there is any possible that subjectHits is not a GenomicRanges Object.

Jianhong.

jianhong commented 4 years ago

Anyway, I merged this patch. It does not hurt. Thank you again.

Jianhong.

millerh1 commented 4 years ago

No problem!

From: JIANHONG OU notifications@github.com Sent: Saturday, April 25, 2020 8:37 AM To: jianhong/ChIPpeakAnno ChIPpeakAnno@noreply.github.com Cc: Henry E. Miller millerh1@livemail.uthscsa.edu; Author author@noreply.github.com Subject: Re: [jianhong/ChIPpeakAnno] Bug in annotatePeakInBatch (fix found): invalid class "DFrame" object: column names should not be NULL (#5)

Anyway, I merged this patch. It does not hurt. Thank you again.

Jianhong.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jianhong/ChIPpeakAnno/issues/5#issuecomment-619380838, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKV4342EWHC3MRQH5RSMEW3ROLRRFANCNFSM4MQFLGSQ.