Bioconductor / GenomicRanges

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

'update' methods need exporting? #7

Closed mtmorgan closed 6 years ago

mtmorgan commented 6 years ago

@hpages This support site question seems to be due to 'update' methods not being exported / documented in GenomicRanges (and elsewhere?). This seems to fix the immediate problem.

GenomicRanges master$ git diff
diff --git a/NAMESPACE b/NAMESPACE
index 3fbb6ff..6d9880c 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -73,7 +73,7 @@ exportMethods(
     merge,

     ## Generics defined in the stats4 package:
-    summary,
+    summary, update,

     ## Generics defined in the BiocGenerics package:
     duplicated, match,

For reference: the reproducible example

seqinfo_hg19 = GenomeInfoDb::Seqinfo(genome = 'hg19')

se <- SummarizedExperiment::SummarizedExperiment(
  rowRanges = GenomicRanges::GRanges(c("chr1", "chr2", "chr1"), 
                                     IRanges::IRanges(1:3, width = 1)))

GenomeInfoDb::seqinfo(se) = seqinfo_hg19[GenomeInfoDb::seqlevelsInUse(se)]
#> Error in methods::slot(object, name): no slot of name "call" for this object of class "GRanges"
hpages commented 6 years ago

I just applied the fix: https://github.com/Bioconductor/GenomicRanges/commit/20fe2d95f0315f34a3f17d7030f15c126e0244c2 Also ported to the RELEASE_3_7 branch. Thanks @mtmorgan !