jianhong / ChIPpeakAnno

11 stars 4 forks source link

toGRanges() no longer working in response to UCSC update #14

Closed jardplard closed 3 years ago

jardplard commented 3 years ago

Hello,

I have been using ChIPPeakAnno for ATAC-seq analysis, and it has worked perfectly for me multiple times in the past couple of months. However, about 1 week ago the toGRanges() function stopped working.

To reproduce this issue:

library(ChIPpeakAnno)
library("EnsDb.Mmusculus.v79")
annoData <- toGRanges(EnsDb.Mmusculus.v79)

This produces the following error message: "Error in .order_seqlevels(chrom_sizes[, "chrom"]) : !anyNA(m31) is not TRUE"

Multiple users in the past week have been experiencing similar issues using different packages, as has been discussed at length here. It seems that the issue is with a bad scaffold which messes with .order_seqlevels and seqLevelsStyle(), but I am not experienced enough with R to fix these issues on my own.

If you have any suggestion for a solution or workaround, I would greatly appreciate it!

jardplard commented 3 years ago

A quick update on the situation: based on the responses in the linked GitHub issue, I used the patched version of GenomeInfoDb and received a different set of errors+warnings.

Calling toGRanges() produces no errors, but the following warning: cannot switch some of GRCm38's seqlevels from NCBI to UCSC style. If this annotation data is used with annotatePeakInBatch(), this warning appears: not all the seqnames of myPeakList is in the AnnotationData.The 2 combined objects have no sequence levels in common.

Lastly, attempting to add gene ID's and feature names to these peaks with addGeneIDs() fails entirely, with the error Error: There is no feature column in annotatedPeak or annotatedPeak has size 0!

I hope this provides some useful context, thank you in advance for your help!

jianhong commented 3 years ago

Hi,

Thank you for reporting this. I patched the package to handle this error. Please try to update the package to development version and try it again. Let me know if you still have question.

Jianhong.

jardplard commented 3 years ago

Hi Jianhong,

Your patch worked great! Thank you so much for fixing it, you have saved a critical component of my analysis.

-Jared