[Bioc-devel] strand<- method for 'GPos' doesn't work

Robert Castelo robert.castelo at upf.edu
Fri Jul 14 11:31:15 CEST 2017


hi,

the strand replacement method for 'GPos' objects does not seem to work:

library(GenomicRanges)
example(GPos)
strand(gpos1) <- "-"
Error in methods::slot(object, name) :
   no slot of name "call" for this object of class "GPos"
traceback()
10: methods::slot(object, name)
9: getElement(x, "call")
8: getCall.default(object)
7: getCall(object)
6: update.default(x, strand = value, check = FALSE)
5: update(x, strand = value, check = FALSE)
4: update(x, strand = value, check = FALSE)
3: .local(x, ..., value)
2: `strand<-`(`*tmp*`, value = "-")
1: `strand<-`(`*tmp*`, value = "-")

this kind of operation works perfectly on 'GRanges' objects, so i guess 
it should also work also with 'GPos' objects:

example(GRanges)
gr1
GRanges object with 1 range and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chr2 [56, 125]      *
   -------
   seqinfo: 1 sequence from an unspecified genome; no seqlength
strand(gr1) <- "-"
gr1
GRanges object with 1 range and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chr2 [56, 125]      -
   -------
   seqinfo: 1 sequence from an unspecified genome; no seqlengths


below my session info. thanks!

robert.
ps: sessionInfo()
sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /opt/R/R-3.4.0/lib64/R/lib/libRblas.so
LAPACK: /opt/R/R-3.4.0/lib64/R/lib/libRlapack.so

locale:
  [1] LC_CTYPE=en_US.UTF8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF8        LC_COLLATE=en_US.UTF8
  [5] LC_MONETARY=en_US.UTF8    LC_MESSAGES=en_US.UTF8
  [7] LC_PAPER=en_US.UTF8       LC_NAME=C
  [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C

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

other attached packages:
[1] GenomicRanges_1.28.3 GenomeInfoDb_1.12.2  IRanges_2.10.2
[4] S4Vectors_0.14.3     BiocGenerics_0.22.0  colorout_1.1-2

loaded via a namespace (and not attached):
[1] zlibbioc_1.22.0         compiler_3.4.0          tools_3.4.0
[4] XVector_0.16.0          GenomeInfoDbData_0.99.0 RCurl_1.95-4.8
[7] bitops_1.0-6



More information about the Bioc-devel mailing list