[Bioc-devel] graph package conflict with GenomicRanges

Cook, Malcolm MEC at stowers.org
Thu Nov 8 18:40:41 CET 2012


Hi,

I find there is some form of namespace conflict between the GenomicRanges package and 'graph'

A session showing reproducible issue, and workaround, follows.

Thanks for your help and attention.

Malcolm Cook
Computational Biology - Stowers Institute for Medical Research

PS:  The issue appears very similar to the issue I previously reported

	http://grokbase.com/t/r/bioc-devel/116anxn80x/graph-package-conflict-with-rtracklayer/11ab01scy8#201110078thy8az6m72fzc0skpj68tw8bm

Which error appears now resolved, thanks to coordination between Martin, Michael,  John, ...????


SESSION TRANSCRIPT
---------------------------------------------------------------------------------------------------------------------

sh-3.2> R

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

...

> source("http://bioconductor.org/biocLite.R"); biocLite(character())

 Bioconductor version 2.11 (BiocInstaller 1.8.3), ?biocLite for help
...

>library(GenomicRanges)

Loading required package: BiocGenerics

Attaching package: 'BiocGenerics'

The following object(s) are masked from 'package:stats':

    xtabs

The following object(s) are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, cbind, colnames, duplicated, eval, get, intersect, lapply, mapply, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rbind, rep.int, rownames, sapply, setdiff, table, tapply, union, unique

Loading required package: IRanges
Warning message:
package 'GenomicRanges' was built under R version 2.15.2 
>  x <- GRanges("chr1", IRanges(c(2, 9) , c(7, 19)), strand=c("+", "-"))
  y <- GRanges("chr1", IRanges(5, 10), strand="-") 
     
  union(x, y)
> > > GRanges with 2 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chr1   [2,  7]      +
  [2]     chr1   [5, 19]      -
  ---
  seqlengths:
   chr1
     NA
> library(graph)
> union(x, y)
 Error in as.vector(x) : no method for coercing this S4 class to a vector
> GenomicRanges::union(x, y) # workaround - prefix with package
GRanges with 2 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chr1   [2,  7]      +
  [2]     chr1   [5, 19]      -
  ---
  seqlengths:
   chr1
     NA
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

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

other attached packages:
[1] graph_1.36.0         GenomicRanges_1.10.4 IRanges_1.16.4       BiocGenerics_0.4.0   BiocInstaller_1.8.3 

loaded via a namespace (and not attached):
[1] parallel_2.15.1 stats4_2.15.1   tools_2.15.1   
> 



More information about the Bioc-devel mailing list