ChIPQC v1.4 fails uninformatively where version 1.2 works fine
4
1
Entering edit mode
@lizingsimmons-6935
Last seen 11 months ago
Germany

I'm re-running some analysis with Bioc3.1, and a ChIPQC analysis that worked just fine with Bioc3.0 and ChIPQCv1.2 seems to fail.

I actually have 20 samples, these were stuck at the "Computing metrics for 20 samples..." stage overnight and it made no progress past this stage. With a single sample, after a few minutes it fails with an error. The error, traceback, and sessionInfo are pasted below.

(The analysis is in an Rmd document where I also use packages that are only available in Bioc3.1, so annoyingly there's no simple way to just use the old version)

The single sample sample sheet looks like this:

Sample Input      SampleID Factor Replicate Num_peaks
1 CTCF_Cuddapah_sorted.bam  <NA> CTCF_Cuddapah   CTCF         1     19386
                                                                 bamReads
1 CTCF_Cuddapah_sorted.bam
  bamControl
1       <NA>
                                                                            Peaks
1 CTCF_Cuddapah_peaks.narrowPeak


qc_res <- ChIPQC(sample_sheet[1,], chromosomes = "chr1")

CTCF_Cuddapah  CTCF   1 bed
Computing metrics for 1 samples...

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘fragmentlength’ for signature ‘"remote-error"’


traceback()
10: stop(gettextf("unable to find an inherited method for function %s for signature %s",
        sQuote(fdef@generic), sQuote(cnames)), domain = NA)
9: (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("remote-error"), function (object = "ChIPQCsample", width)
   standardGeneric("fragmentlength"), <environment>)
8: FUN(X[[i]], ...)
7: lapply(X = X, FUN = FUN, ...)
6: sapply(object@Samples, fragmentlength)
5: sapply(object@Samples, fragmentlength)
4: .local(object)
3: fragmentlength(res)
2: fragmentlength(res)
1: ChIPQC(sample_sheet[1, ], chromosomes = "chr1")


sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Debian GNU/Linux 8 (jessie)

locale:
[1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C             
[3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8   
[5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8  
[7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                
[9] LC_ADDRESS=C               LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
[1] ChIPQC_1.4.0            DiffBind_1.14.0         RSQLite_1.0.0         
[4] DBI_0.3.1               locfit_1.5-9.1          GenomicAlignments_1.4.0
[7] Rsamtools_1.20.0        Biostrings_2.36.0       XVector_0.8.0         
[10] limma_3.24.0            GenomicRanges_1.20.2    GenomeInfoDb_1.4.0    
[13] IRanges_2.2.0           S4Vectors_0.6.0         BiocGenerics_0.14.0   
[16] ggplot2_1.0.1          

loaded via a namespace (and not attached):
[1] Rcpp_0.11.5            lattice_0.20-31        GO.db_3.1.2          
[4] snow_0.3-13            gtools_3.4.2           digest_0.6.8         
[7] Nozzle.R1_1.1-1        plyr_1.8.2             futile.options_1.0.0 
[10] BatchJobs_1.6          ShortRead_1.26.0       gplots_2.16.0        
[13] zlibbioc_1.14.0        annotate_1.46.0        gdata_2.13.3         
[16] Matrix_1.2-0           checkmate_1.5.2        systemPipeR_1.2.0    
[19] proto_0.3-10           GOstats_2.34.0         splines_3.2.0        
[22] BiocParallel_1.2.0     chipseq_1.18.0         stringr_0.6.2        
[25] RCurl_1.95-4.5         pheatmap_1.0.2         munsell_0.4.2        
[28] rtracklayer_1.28.2     sendmailR_1.2-1        base64enc_0.1-2      
[31] BBmisc_1.9             fail_1.2               edgeR_3.10.0         
[34] XML_3.98-1.1           AnnotationForge_1.10.0 MASS_7.3-40          
[37] bitops_1.0-6           grid_3.2.0             RBGL_1.44.0          
[40] xtable_1.7-4           GSEABase_1.30.1        gtable_0.1.2         
[43] scales_0.2.4           graph_1.46.0           KernSmooth_2.23-14   
[46] amap_0.8-14            hwriter_1.3.2          reshape2_1.4.1       
[49] genefilter_1.50.0      latticeExtra_0.6-26    futile.logger_1.4.1  
[52] brew_1.0-6             rjson_0.2.15           lambda.r_1.1.7       
[55] RColorBrewer_1.1-2     tools_3.2.0            BSgenome_1.36.0      
[58] Biobase_2.28.0         Category_2.34.0        survival_2.38-1      
[61] AnnotationDbi_1.30.0   colorspace_1.2-6       caTools_1.17.1       

 

 

chipqc • 1.6k views
ADD COMMENT
2
Entering edit mode
@thomas-carroll-7019
Last seen 16 months ago
United States/New York/The Rockefeller …

Hi Liz,

Sorry about that. I have fixed the issue (from a call to the wrong table method) and checked into ChIPQC 1.4.1

Please let me know if you have any other issues.

best,

tom

 

 

 

Thomas Carroll

http://bioinformatics.csc.mrc.ac.uk/

Head of Bioinformatics

MRC Clinical Sciences Centre, Faculty of Medicine,

Imperial College London,Hammersmith Hospital Campus

Du Cane Road,London,W12 0NN

ADD COMMENT
0
Entering edit mode

Received the exact same error, when running on ChIPQC 1.4.3.

I have not, however, run my data on any other version.

Any suggestions?

 

> ExperimentFile<-"/home/khoegenauer/Data/Analysis/HSC_Lineage_ChIP-seq/H3K27ac/H3K27ac_1_2_MACS2.csv"
> BlacklistFile<-"/media/Data/Genome/Mouse/mm9/Features/ENCODE_ChIP-seq_Blacklist/mm9-blacklist.bed"
> expQC = ChIPQC(experiment=ExperimentFile, annotation="mm9", blacklist=BlacklistFile, chromosomes = NULL)
GMP_MACS2_1 GMP H3K27ac  MACS2 1 “bed”
GMP_MACS2_2 GMP H3K27ac  MACS2 2 “bed”
GMP_MACS2_IDR GMP H3K27ac  MACS2-IDR 1 “bed”
HSC_MACS2_1 HSC H3K27ac  MACS2 1 “bed”
HSC_MACS2_2 HSC H3K27ac  MACS2 2 “bed”
HSC_MACS2_IDR HSC H3K27ac  MACS2-IDR 1 “bed”
MPP_MACS2_1 MPP H3K27ac  MACS2 1 “bed”
MPP_MACS2_IDR MPP H3K27ac  MACS2-IDR 1 “bed”
WBM_MACS2_1 WBM H3K27ac  MACS2 1 “bed”
WBM_MACS2_2 WBM H3K27ac  MACS2 2 “bed”
WBM_MACS2_IDR WBM H3K27ac  MACS2-IDR 1 “bed”
Compiling annotation...
Computing metrics for 22 samples...
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘fragmentlength’ for signature ‘"remote-error"’

> traceback()
10: stop(gettextf("unable to find an inherited method for function %s for signature %s",
        sQuote(fdef@generic), sQuote(cnames)), domain = NA)
9: (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("remote-error"), function (object = "ChIPQCsample", width)
   standardGeneric("fragmentlength"), <environment>)
8: FUN(X[[i]], ...)
7: lapply(X = X, FUN = FUN, ...)
6: sapply(object@Samples, fragmentlength)
5: sapply(object@Samples, fragmentlength)
4: .local(object)
3: fragmentlength(res)
2: fragmentlength(res)
1: ChIPQC(experiment = ExperimentFile, annotation = "mm9", blacklist = BlacklistFile,
       chromosomes = NULL)

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.2 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8
[12] LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics
[5] grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] ChIPQC_1.4.3                           
 [2] DiffBind_1.14.3                        
 [3] RSQLite_1.0.0                          
 [4] DBI_0.3.1                              
 [5] locfit_1.5-9.1                         
 [6] GenomicAlignments_1.4.1                
 [7] Rsamtools_1.20.2                       
 [8] Biostrings_2.36.1                      
 [9] XVector_0.8.0                          
[10] limma_3.24.4                           
[11] ggplot2_1.0.1                          
[12] TxDb.Mmusculus.UCSC.mm9.knownGene_3.1.2
[13] GenomicFeatures_1.20.1                 
[14] BiocInstaller_1.18.2                   
[15] AnnotationDbi_1.30.1                   
[16] Biobase_2.28.0                         
[17] GenomicRanges_1.20.3                   
[18] GenomeInfoDb_1.4.0                     
[19] IRanges_2.2.1                          
[20] S4Vectors_0.6.0                        
[21] BiocGenerics_0.14.0                    

loaded via a namespace (and not attached):
 [1] edgeR_3.10.0          
 [2] splines_3.2.0         
 [3] gtools_3.4.2          
 [4] latticeExtra_0.6-26   
 [5] amap_0.8-14           
 [6] RBGL_1.44.0           
 [7] BSgenome_1.36.0       
 [8] Category_2.34.2       
 [9] lattice_0.20-31       
[10] digest_0.6.8          
[11] RColorBrewer_1.1-2    
[12] checkmate_1.5.3       
[13] colorspace_1.2-6      
[14] Matrix_1.2-0          
[15] plyr_1.8.2            
[16] GSEABase_1.30.1       
[17] chipseq_1.18.0        
[18] XML_3.98-1.1          
[19] pheatmap_1.0.2        
[20] ShortRead_1.26.0      
[21] biomaRt_2.24.0        
[22] genefilter_1.50.0     
[23] zlibbioc_1.14.0       
[24] xtable_1.7-4          
[25] GO.db_3.1.2           
[26] scales_0.2.4          
[27] snow_0.3-13           
[28] brew_1.0-6            
[29] gdata_2.16.1          
[30] BiocParallel_1.2.1    
[31] annotate_1.46.0       
[32] proto_0.3-10          
[33] survival_2.38-1       
[34] magrittr_1.5          
[35] systemPipeR_1.2.1     
[36] fail_1.2              
[37] MASS_7.3-40           
[38] gplots_2.17.0         
[39] hwriter_1.3.2         
[40] GOstats_2.34.0        
[41] graph_1.46.0          
[42] tools_3.2.0           
[43] BBmisc_1.9            
[44] stringr_1.0.0         
[45] sendmailR_1.2-1       
[46] munsell_0.4.2         
[47] lambda.r_1.1.7        
[48] caTools_1.17.1        
[49] futile.logger_1.4.1   
[50] grid_3.2.0            
[51] RCurl_1.95-4.6        
[52] rjson_0.2.15          
[53] AnnotationForge_1.10.1
[54] bitops_1.0-6          
[55] base64enc_0.1-2       
[56] gtable_0.1.2          
[57] reshape2_1.4.1        
[58] Nozzle.R1_1.1-1       
[59] rtracklayer_1.28.2    
[60] futile.options_1.0.0  
[61] KernSmooth_2.23-14    
[62] stringi_0.4-1         
[63] BatchJobs_1.6         
[64] Rcpp_0.11.6           

 

mm9 blacklist file was obtained from ENCODE.

Reads are from Ion Torrent (Proton), if that makes a difference.

Peaks are narrowPeak files from MACS v2.1 (Received the same error after running with peaks from HOMER v4.7 converted to narrowPeak format.)

 

ADD REPLY
0
Entering edit mode

hi khoegenauer,

I believe we resolved this for Liz's error. This is something else.

If you can post your code, any output and sessioninfo() that would be helpful to start to look.

If i can't resolve it from there I may need a minimal example dataset which recreates the error and i can debug with that. I can provide somewhere to put the data off the list so we can share.

thanks,

tom

ADD REPLY
1
Entering edit mode
Rory Stark ★ 4.1k
@rory-stark-5741
Last seen 19 days ago
CRUK, Cambridge, UK

I have just checked in a fix to ChIPQC 1.4 that may help. It will appear in the next build as ChIPQC 1.4.4.

The reason you are seeing this message:

  unable to find an inherited method for function ‘fragmentlength’ for signature ‘"remote-error"’

is that there is an error processing one of the samples. The change I made will identify which sample(s) have an error what the error is. Hopefully that message will point you in the right direction. If it is not obvious from the message, post the new message here and we may know what causes it.

Cheers-

Rory

ADD COMMENT
0
Entering edit mode

Thanks.

Ran again and received this:

Error in sample TEST1: error in evaluating the argument 'x' in selecting a method for function 'mean': Error in width(temp[1:tocheckforreads]) :
  error in evaluating the argument 'x' in selecting a method for function 'width': Error in NSBS(i, x, exact = exact, upperBoundIsStrict = !allow.append) :
  subscript contains NAs or out-of-bounds indices

I filtered out any chromosome containing <1000 mapped reads (1000 = value of tocheckforreads) -- Mt, in my case -- and ran again. When returning to this stage, no error.

Later, i received:

Error in which.max(running(crosscoverage(object)[-seq(1:(2 * readlength(object)))],  :
  error in evaluating the argument 'x' in selecting a method for function 'which.max': Error in 1:(2 * readlength(object)) : NA/NaN argument

Running each sample individually (as well as subsetting each sample to any one chromosome) via ChIPQCsample revealed that readlength is not being set for any of the samples.

As individual ChIPQCsample objects, the error isn't apparent until inspecting the object. When running ChIPQC, however, the error terminates execution.

With limited background knowledge on objects in R, https://github.com/Bioconductor-mirror/ChIPQC/blob/master/R/ChIPQCsample-class.R#L80 didn't give me any leads.

Suggestions?

Thanks,

Kevin

ADD REPLY
0
Entering edit mode

hi Kevin,

Could you post your sessionInfo() and a ChIPQCsample object. I can then take a look and get back to you.

thanks,

tom

 

ADD REPLY
0
Entering edit mode
@thomas-carroll-7019
Last seen 16 months ago
United States/New York/The Rockefeller …

hi khoegenauer,

I believe we resolved this for Liz's error. This is something else.

If you can post your code, any output and sessioninfo() that would be helpful to start to look.

If i can't resolve it from there I may need a minimal example dataset which recreates the error and i can debug with that. I can provide somewhere to put the data off the list so we can share.

thanks,

tom

ADD COMMENT
0
Entering edit mode
Rory Stark ★ 4.1k
@rory-stark-5741
Last seen 19 days ago
CRUK, Cambridge, UK

Hello-

From the trace it looks like the issue may be in my code, so I'll take a look at this.

The trick is going to be reproducing it without needing all your data. If you email me directly at  rory.stark@cruk.cam.ac.uk, I can make some suggestions as to how to go about this. I will then post the solution to this board.

Regards-

Rory

ADD COMMENT

Login before adding your answer.

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