[Bioc-sig-seq] generic for strand in genomeIntervals and GenomicRanges
Martin Morgan
mtmorgan at fhcrc.org
Mon Mar 28 19:42:41 CEST 2011
On 03/28/2011 05:11 AM, Julien Gagneur wrote:
> Hi,
>
> both genomeIntervals and the more recent GenomicRanges define a
> generic method 'strand'. There is the same issue for the method
> 'reduce' between IRanges and 'Intervals' (which is on CRAN, not on
> Bioconductor). This leads to conflicts for users that load both
> packages. Below sample code (the same happens on R 2.13 devel).
>
> How shall we solve that?
In general, specify the package from which the generic comes from
GenomicRanges::strand
genomeIntervals::strand
It would in general be nice to coordinate generics across packages, but
the prospects for that in this particular case are unclear --
genomeIntervals and GenomicRanges have pretty independent and
more-or-less mutually exclusive dependencies.
Martin
>
> Thanks for your advices,
>
> Julien Gagneur
>
>
>
>
>> library(GenomicRanges)
> Loading required package: IRanges
>
> Attaching package: 'IRanges'
>
> The following object(s) are masked from 'package:base':
>
> Map, cbind, eval, mapply, order, paste, pmax, pmax.int, pmin,
> pmin.int, rbind, rep.int, table
>
>> library(genomeIntervals)
> Loading required package: intervals
>
> Attaching package: 'intervals'
>
> The following object(s) are masked from 'package:IRanges':
>
> reduce
>
>
> Attaching package: 'genomeIntervals'
>
> The following object(s) are masked from 'package:GenomicRanges':
>
> strand, strand<-
>
>> grngs = GRanges(seqnames=c("chr1", "chr2"),
>> ranges=IRanges(start=1:2, end=2:3), strand=c("+","-"))
>> strand(grngs)
> Error in function (classes, fdef, mtable) : unable to find an
> inherited method for function "strand", for signature "GRanges"
>> reduce(grngs)
> Error in function (classes, fdef, mtable) : unable to find an
> inherited method for function "reduce", for signature "GRanges"
>
>> sessionInfo()
> R version 2.12.1 (2010-12-16) 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] intervals_0.13.1 GenomicRanges_1.2.3
> IRanges_1.8.9
>
> loaded via a namespace (and not attached): [1] Biobase_2.10.0
> genomeIntervals_1.7.4 tools_2.12.1
>
> _______________________________________________ Bioc-sig-sequencing
> mailing list Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioc-sig-sequencing
mailing list