Bioconductor / GenomicRanges

Representation and manipulation of genomic intervals
https://bioconductor.org/packages/GenomicRanges
41 stars 17 forks source link

strange code for GenomicRanges:::compatibleStrand #33

Open msannell opened 4 years ago

msannell commented 4 years ago

Hi. I noticed some strange code in GenomicRanges (v1.38.0) for the function GenomicRanges:::compatibleStrand. I believe that when building GenomicRanges in R, the following happens:

  1. R processes strand-utils.R, which defines an S4 generic for compatibleStrand stored in GenomicRanges:::compatibleStrand, and defines several S4 methods.

  2. R processes findOverlaps-methods.R (this is processed after strand-utils.R, according to the "Collate" field in GenomicRanges/DESCRIPTION). This file defines a regular function stored in GenomicRanges:::compatibleStrand, overwriting the generic function defined in strand-utils.R.

Thus, this package defines several methods for compatibleStrand that are never used, since there is no S4 generic function for it. Was this intentional? It could be that the generic and methods are just stale code that should be removed.

hpages commented 4 years ago

yikes! not good. I'll take care of it. Thanks for the catch.