Hi all,
I'm experiencing some issues getting my peaks, reads, and metadata into ChIPQC object format. The function seems to choke when compiling the annotation (mm10). My sample sheet contains information about 3 samples and the peak files are in narrowPeak format (from MACS2). I've copied my commands and the error below. This works fine when I don't specify an annotation. It throws the same error when I try mm9 and hg19.
> samples = read.csv(file="ATAC_TEST_sampleSheet_local.csv", header=TRUE)> exp = ChIPQC(samples, annotation = "mm10", chromosomes=NULL) BL6-nkd BL6 2018-05-16 3 narrow P0-1-5 P0 2017-05-17 2 narrow P0-1-2 P0 2018-03-26 1 narrow Compiling annotation... Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘getListElement’ for signature ‘"GRanges"’
> traceback() 22: stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) 21: (function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) return(methods[[1L]]) else if (length(methods) == 0L) { cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ") stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) } else stop("Internal error in finding inherited methods; didn't return a unique method", domain = NA) })(list("GRanges"), new("standardGeneric", .Data = function (x, i, exact = TRUE) standardGeneric("getListElement"), generic = "getListElement", package = "S4Vectors", group = list(), valueClass = character(0), signature = "x", default = NULL, skeleton = (function (x, i, exact = TRUE) stop("invalid call in method dispatch to 'getListElement' (no default method)", domain = NA))(x, i, exact)), <environment>) 20: getListElement(x, i, ...) 19: X[[i]] 18: X[[i]] 17: FUN(X[[i]], ...) 16: FUN(X[[i]], ...) 15: lapply(ii, function(i) FUN(X[[i]], ...)) 14: lapply(ii, function(i) FUN(X[[i]], ...)) 13: lapply(x, identity) 12: lapply(x, identity) 11: .local(x, ...) 10: as.list(x) 9: as.list(x) 8: unname(as.list(x)) 7: unlist(x, recursive, use.names) 6: unlist(x, recursive, use.names) 5: unlist(transcripts(txdb)) 4: unique(unlist(transcripts(txdb))) 3: reduce(unique(unlist(transcripts(txdb)))) 2: getAnnotation(annotation, AllChr = chromosomes) 1: ChIPQC(samples, annotation = "mm10", chromosomes = NULL)
Has anyone seen this behavior before? Any troubleshooting suggestions would be much appreciated.
Thanks!
NB:
I've tried running with the package's example data using exactly the same commands as the vignette, but even that isn't working (although it looks like for a different reason).
> ex_samples = read.csv(file.path(system.file("extdata", package="ChIPQC"),
+ "example_QCexperiment.csv"))
> ex_samples
SampleID Tissue Factor Replicate bamReads Peaks
1 CTCF_1 A549 CTCF 1 reads/SRR568129.bam peaks/SRR568129_chr22_peaks.bed
2 CTCF_2 A549 CTCF 2 reads/SRR568130.bam peaks/SRR568130_chr22_peaks.bed
3 cMYC_1 A549 cMYC 1 reads/SRR568131.bam peaks/SRR568131_chr22_peaks.bed
4 cMYC_2 A549 cMYC 2 reads/SRR568132.bam peaks/SRR568132_chr22_peaks.bed
5 E2F1_1 HeLa-S3 E2F1 1 reads/SRR502355.bam peaks/SRR502355_chr22_peaks.bed
6 E2F1_2 HeLa-S3 E2F1 2 reads/SRR502356.bam peaks/SRR502356_chr22_peaks.bed
> exampleExp = ChIPQC(ex_samples, annotation ="hg19")
CTCF_1 A549 CTCF 1 bed
Error in if file.info(peaks)$size > 0) { :
missing value where TRUE/FALSE needed
All packages are up-to-date.
> BiocInstaller::biocValid()
[1] TRUE
> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] ChIPQC_1.16.0 DiffBind_2.8.0 [3] SummarizedExperiment_1.10.1 DelayedArray_0.6.6 [5] BiocParallel_1.14.2 matrixStats_0.54.0 [7] ggplot2_3.0.0 TxDb.Mmusculus.UCSC.mm10.knownGene_3.4.0 [9] GenomicFeatures_1.32.2 AnnotationDbi_1.42.1 [11] Biobase_2.40.0 GenomicRanges_1.32.6 [13] GenomeInfoDb_1.16.0 IRanges_2.14.11 [15] S4Vectors_0.18.3 BiocGenerics_0.26.0
Hi Thomas,
Please note that GRanges objects were never intended to support
unlist()
. However it used to be thatunlist()
would work on them, just by chance, and be a no-op. Not sure why your code callsunlist()
on a GRanges object or what you expected it to do. What has changed in BioC 3.7 is that now callingunlist()
on a GRanges object is an error.I just committed a change to GenomicRanges to make the error message a little bit less obscure:
This is in GenomicRanges 1.32.7 (release) and 1.33.14 (devel).
H.
hi Herve,
Thank you for editing the error message.
tom
I am having the same issue. Thanks for working on that!
I am looking forward to run the update.
H.
Hi Tom,
I am wondering if this issue has been solved. I'm currently using ChIPQC_1.18.2 and I also have the same error message. Error in getListElement(x, i, ...) : GRanges objects don't support [[, as.list(), lapply(), or unlist() at the moment
Thank you so much.