ChIPQC: error during annotation compilation
2
1
Entering edit mode
hdingwall ▴ 10
@hdingwall-17390
Last seen 6.2 years ago

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 
ChIPQC • 2.5k views
ADD COMMENT
1
Entering edit mode
@thomas-carroll-7019
Last seen 2.0 years ago
United States/New York/The Rockefeller …

hi,

I have added the fix in development version ChIPQC 1.17.1 and to ChIPQC 1.16.1 now. Should be available from git repository and through biocLite tomorrow.

very best,

tom

ADD COMMENT
0
Entering edit mode
@thomas-carroll-7019
Last seen 2.0 years ago
United States/New York/The Rockefeller …

 

hi,

Thank you for report. Yes, it looks like something changed in behavior of unlist on a GRanges objects.

> library(GenomicRanges)
> unlist(GRanges("chr1:10-100"))
GRanges object with 1 range and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chr1 [10, 100]      *
  -------
  seqinfo: 1 sequence from an unspecified genome; no seqlengths
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.5

attached base packages:

[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] GenomicRanges_1.28.6 GenomeInfoDb_1.12.3  IRanges_2.10.5       S4Vectors_0.14.7     BiocGenerics_0.22.1 

loaded via a namespace (and not attached):
[1] zlibbioc_1.22.0         compiler_3.4.1          XVector_0.16.0          tools_3.4.1          
[5] GenomeInfoDbData_0.99.0 RCurl_1.95-4.10         bitops_1.0-6           

...

> library(GenomicRanges)
> unlist(GRanges("chr1:10-100"))
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘getListElement’ for signature ‘"GRanges"’
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.5


other attached packages:

[1] GenomicRanges_1.32.6 GenomeInfoDb_1.16.0  IRanges_2.14.11      S4Vectors_0.18.3     BiocGenerics_0.26.0 

loaded via a namespace (and not attached):
[1] zlibbioc_1.26.0        compiler_3.5.0         XVector_0.20.0         tools_3.5.0           
[5] GenomeInfoDbData_1.1.0 RCurl_1.95-4.11        bitops_1.0-6          

 

I will update ChIPQC to avoid unlisting.

best,

tom

ADD COMMENT
0
Entering edit mode

Hi Thomas,

Please note that GRanges objects were never intended to support unlist(). However it used to be that unlist() would work on them, just by chance, and be a no-op. Not sure why your code calls unlist() on a GRanges object or what you expected it to do. What has changed in BioC 3.7 is that now calling unlist() on a GRanges object is an error.

I just committed a change to GenomicRanges to make the error message a little bit less obscure:

unlist(GRanges("chr1:3-10"))
# Error in getListElement(x, i, ...) : 
#   GRanges objects don't support [[, as.list(), lapply(), or unlist() at
#   the moment

This is in GenomicRanges 1.32.7 (release) and 1.33.14 (devel).

H.

ADD REPLY
0
Entering edit mode

hi Herve,

Thank you for editing the error message. 

tom

 

ADD REPLY
0
Entering edit mode

I am having the same issue. Thanks for working on that!

I am looking forward to run the update.

H.  

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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