Using hash packages with package:rtracklayer, GenomicRanges, Gviz, IRanges, biomaRt conflict
1
1
Entering edit mode
@tiphaine-martin-6416
Last seen 6.1 years ago
France

Hi,

I am developing a R package that I would like to publish in Bioconductor but I have warning when I load the package hash (http://cran.r-project.org/web/packages/hash/hash.pdf) after loading the packages : rtracklayer, GenomicRanges, Gviz, biomaRt.

I need to create a hash array to create annotation tracks from user's lists. Could you help me to remove this warning in order to publish in Bioconductor ?

Regards,

Tiphaine

##Error message

Attaching package:
’hash’
The following object is masked from ’package:rtracklayer’:
values
The following object is masked from ’package:gWidgetstcltk’:
delete
The following object is masked from ’package:gWidgets’:
delete
The following objects are masked from ’package:GenomicRanges’:
values, values<-
The following objects are masked from ’package:IRanges’:
values, values<-
The following objects are masked from ’package:Gviz’:
values, values<-
The following object is masked from ’package:biomaRt’:
keys
## Warning:
## Warning:
## Warning:
replacing previous import by ’hash::keys’ when loading ’coMET’
replacing previous import by ’hash::values’ when loading ’coMET’
replacing previous import by ’hash::values<-’ when loading ’coMET’

### SessionInfo()

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8      
[4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_GB.UTF-8  
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C             
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] XVector_0.4.0        coMET_0.99.0         hash_2.2.6           colortools_0.1.5     rtracklayer_1.24.2 
[6] trackViewer_1.0.2    gWidgetstcltk_0.0-55 digest_0.6.4         gWidgets_0.0-54      GenomicRanges_1.16.4
[11] GenomeInfoDb_1.0.2   IRanges_1.22.10      ggbio_1.12.10        ggplot2_1.0.0        Gviz_1.8.4         
[16] BiocGenerics_0.10.0  biomaRt_2.20.0      

loaded via a namespace (and not attached):
[1] acepack_1.3-3.3          AnnotationDbi_1.26.0     base64enc_0.1-2          BatchJobs_1.3          
[5] BBmisc_1.7               Biobase_2.24.0           BiocParallel_0.6.1       Biostrings_2.32.1      
[9] biovizBase_1.12.3        bitops_1.0-6             brew_1.0-6               BSgenome_1.32.0        
[13] checkmate_1.4            cluster_1.15.3           codetools_0.2-9          colorspace_1.2-4       
[17] DBI_0.3.0                devtools_1.6             dichromat_2.0-0          fail_1.2               
[21] foreach_1.4.2            foreign_0.8-61           Formula_1.1-2            GenomicAlignments_1.0.6
[25] GenomicFeatures_1.16.2   gridExtra_0.9.1          gtable_0.1.2             Hmisc_3.14-5           
[29] iterators_1.0.7          lattice_0.20-29          latticeExtra_0.6-26      MASS_7.3-34            
[33] matrixStats_0.10.0       munsell_0.4.2            nnet_7.3-8               pbapply_1.1-1          
[37] plyr_1.8.1               proto_0.3-10             RColorBrewer_1.0-5       Rcpp_0.11.2            
[41] RCurl_1.95-4.3           reshape2_1.4             R.methodsS3_1.6.1        rpart_4.1-8            
[45] Rsamtools_1.16.1         RSQLite_0.11.4           scales_0.2.4             sendmailR_1.2-1        
[49] splines_3.1.1            stats4_3.1.1             stringr_0.6.2            survival_2.37-7        
[53] tools_3.1.1              VariantAnnotation_1.10.5 XML_3.98-1.1             zlibbioc_1.10.0   
software error bioc-devel • 1.8k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

Hi Tiphanie -- Questions about developing Bioconductor packages should be addressed to the Bioc-devel mailing list. Please post follow-up and related questions there.

The above are messages and warnings, not an error, but still disconcerting to the user. For The following object is masked from ’package:rtracklayer’: values, the meaning is that two packages that are attached to the search() path both provide functions value(). The user then has to resolve these explicitly, e.g., rtracklayer::value(<object handled by rtracklayer's 'value'). Likely the problem is that too many packages are in Depends: fields of package DESCRIPTION files; if the conflicts arise indirectly from packages that your package MUST Depends: on (rather than Imports:), then there is little to do other than communicate with the authors of the package that put rtracklayer / hash on the search path.

In this case it seems like your own package Depends: hash. Likely the hash package provides functionality that is useful to the package developer, but irrelevant to the user. In this case the solution is to indicate in your DESCRIPTION file that your package Imports: hash, rather than Depends: hash.

This leads to the next warning, replacing previous import by ’hash::keys’ when loading ’coMET'. Here the problem is that in your NAMESPACE file you have perhaps written imports(rtracklayer) and imports(hash). Instead you need to selectively import just the functionality needed, from one or both packages, e.g., importFrom(hash, foo). It might be that you want to use both rtracklayer's value() and hash's value(). Forgo importFrom(hash, value), and use in your code hash::value().

ADD COMMENT

Login before adding your answer.

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