summarizeOverlaps: ambiguous method dispatch
1
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
Entering this code: library(TxDb.Hsapiens.UCSC.hg19.knownGene) library(LungCancerLines) exons <- exons(TxDb.Hsapiens.UCSC.hg19.knownGene, vals = list(gene_id = "7157")) counts <- summarizeOverlaps(exons, LungCancerBamFiles()) Yields: Note: method with signature 'GAlignments#Vector' chosen for function 'countOverlaps', target signature 'GAlignments#GRanges'. "Vector#GenomicRanges" would also be valid Note: method with signature 'GAlignments#Vector' chosen for function 'countOverlaps', target signature 'GAlignments#GRanges'. "Vector#GenomicRanges" would also be valid While this is apparently harmless, a couple of questions: - What is the rationale for defining countOverlaps methods on 'Vector'? If this is a simple wrapper, why not go all the way to ANY? - Would it be feasible to avoid these Notes (which probably unnecessarily worry the user), for example by defining specific methods for GenomicRanges and GRangesList? I realize that dual dispatch is inherently prone to ambiguities, but some brute-forcing might be worth the effort. Michael [[alternative HTML version deleted]]
GO GO • 593 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 12 days ago
United States
On 05/18/2013 04:38 PM, Michael Lawrence wrote: > Entering this code: > > library(TxDb.Hsapiens.UCSC.hg19.knownGene) > library(LungCancerLines) > exons <- exons(TxDb.Hsapiens.UCSC.hg19.knownGene, vals = list(gene_id = > "7157")) > counts <- summarizeOverlaps(exons, LungCancerBamFiles()) > > Yields: > > Note: method with signature 'GAlignments#Vector' chosen for function > 'countOverlaps', > target signature 'GAlignments#GRanges'. > "Vector#GenomicRanges" would also be valid > Note: method with signature 'GAlignments#Vector' chosen for function > 'countOverlaps', > target signature 'GAlignments#GRanges'. > "Vector#GenomicRanges" would also be valid > > While this is apparently harmless, a couple of questions: > > - What is the rationale for defining countOverlaps methods on 'Vector'? If > this is a simple wrapper, why not go all the way to ANY? > > - Would it be feasible to avoid these Notes (which probably unnecessarily > worry the user), for example by defining specific methods for GenomicRanges > and GRangesList? I realize that dual dispatch is inherently prone to > ambiguities, but some brute-forcing might be worth the effort. Yes, this will get addressed, thanks for the heads up. Martin > > Michael > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

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