Question: Error with mappability argument
gravatar for Ashley.Sawle
2.5 years ago by
Ashley.Sawle0 wrote:

I am getting an error when running chipenrich. It appears to be related to the new (as of v2.0.0) 'mappability' argument. The code I am running is:

> library(chipenrich)
> peaks <- read.delim("peakFile.test.bed")
> head(peaks)
  chrom     start       end
1  chr2  45979647  45980082
2 chr15  39960665  39961062
3 chr11 101312413 101312854
4  chrX  16637117  16637474
5  chr9  33221193  33221658
6  chr1  51787036  51787366
> results <- chipenrich(peaks, out_name = NULL, genome = "hg19", genesets = "GOBP", mappability = 50)
Error in file.exists(mappa_code) : invalid 'file' argument
> traceback()
3: file.exists(mappa_code)
2: setup_mappa(mappa_code = mappability, genome = genome, ldef_code = locusdef,
       ldef_obj = ldef)
1: chipenrich(peaks, out_name = NULL, genome = "hg19", genesets = "GOBP",
       mappability = 50)

If I provide the 'mappability' as a string it seems to work fine:

> results <- chipenrich(peaks, out_name = NULL, genome = "hg19", genesets = "GOBP", mappability = "50")
Reading peaks from data.frame...
Assigning peaks to genes with assign_peaks(...) ..
Mappability adjustment is enabled..
Test: ChIP-Enrich
Genesets: Gene Ontology Biological Process
Running tests..

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/
LAPACK: /usr/lib/lapack/

 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            

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

other attached packages:
[1] magrittr_1.5     chipenrich_2.0.0 optparse_1.3.2  

loaded via a namespace (and not attached):
 [1] Biobase_2.36.2            splines_3.4.0              Formula_1.2-1              stats4_3.4.0              
 [6] latticeExtra_0.6-28        GenomeInfoDbData_0.99.0    Rsamtools_1.28.0           RSQLite_1.1-2              backports_1.0.5           
[11] lattice_0.20-35            quantreg_5.33              digest_0.6.12              GenomicRanges_1.28.1       RColorBrewer_1.1-2        
[16] XVector_0.16.0             checkmate_1.8.2            sandwich_2.3-4             colorspace_1.3-2           rms_5.1-1                 
[21] htmltools_0.3.6            Matrix_1.2-10              plyr_1.8.4                 XML_3.98-1.7               SparseM_1.77              
[26] chipenrich.data_2.0.0      zlibbioc_1.22.0           mvtnorm_1.0-6              scales_0.4.1              
[31] getopt_1.20.0             MatrixModels_0.4-1         BiocParallel_1.10.1        htmlTable_1.9             
[36] tibble_1.3.0               mgcv_1.8-17                IRanges_2.10.0             ggplot2_2.2.1              TH.data_1.0-8             
[41] SummarizedExperiment_1.6.1 nnet_7.3-12                BiocGenerics_0.22.0        lazyeval_0.2.0             survival_2.41-3           
[46] polspline_1.1.12           memoise_1.1.0              MASS_7.3-47                nlme_3.1-131               foreign_0.8-68            
[51] tools_3.4.0                data.table_1.10.4          hms_0.3                   multcomp_1.4-6            
[56] matrixStats_0.52.2         stringr_1.2.0              S4Vectors_0.14.0           munsell_0.4.3              cluster_2.0.6             
[61] DelayedArray_0.2.1         AnnotationDbi_1.38.0       Biostrings_2.44.0          compiler_3.4.0             GenomeInfoDb_1.12.0       
[66] grid_3.4.0                 RCurl_1.95-4.8             htmlwidgets_0.8            bitops_1.0-6               base64enc_0.1-3           
[71] codetools_0.2-15           gtable_0.2.0               DBI_0.6-1                  R6_2.2.0                   zoo_1.8-0                 
[76] GenomicAlignments_1.12.0   gridExtra_2.2.1            knitr_1.15.1               rtracklayer_1.36.0         Hmisc_4.0-3               
[81] readr_1.1.0                stringi_1.1.5              parallel_3.4.0             Rcpp_0.12.10             
[86] rpart_4.1-11               acepack_1.4.1      



chipenrich • 468 views
ADD COMMENTlink modified 2.5 years ago by rcavalca130 • written 2.5 years ago by Ashley.Sawle0
Answer: Error with mappability argument
gravatar for rcavalca
2.5 years ago by
United States
rcavalca130 wrote:

Hi Ashley,

Sorry for the delay in response, I was out of town. You're absolutely right. I should be coercing that parameter to a character before checking to see if it's a custom mappability file path that's given.

I've fixed this in the devel version, and will similarly fix it in the release version. It should show up in the Bioconductor build system in a day or so. For now, continue to pass the mappability as a string since that avoids the problem. Sorry for the trouble.

Thanks for using chipenrich,


ADD COMMENTlink written 2.5 years ago by rcavalca130
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 213 users visited in the last hour