Why does a `first_time` object appear when showing GRangesList object?
1
0
Entering edit mode
@ericedwardbryant-12164
Last seen 7.8 years ago

Why does an object named first_time appear in the global environment when I show GRangesList objects?

I tried to debug this to figure out where it gets created, but all I managed to figure out is that it shows up inexplicably while inside GenomicRanges:::.GenomicRanges_summary.

I see one mention on the support site in this post: A: Strange first_time object in rtracklayer import. However, this object is created even while running in a vanilla session of R in the terminal.

Here is my (hopefully) reproducible example:

gr  <- GenomicRanges::GRanges(
  seqnames = "chr2", 
  ranges   = IRanges::IRanges(3, 6), 
  strand   = "+")​

grl <- GenomicRanges::split(gr, "chr2")​ # creates a GRangesList object

ls()
## [1]  "gr"   "grl"

grl   # Show/print the object

ls()
## [1] "first_time"  "gr"  "grl"

sessionInfo()
version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] zlibbioc_1.20.0      IRanges_2.8.1        XVector_0.14.0      
[4] parallel_3.3.2       GenomicRanges_1.26.1 S4Vectors_0.12.1    
[7] BiocGenerics_0.20.0  GenomeInfoDb_1.10.1  stats4_3.3.2
genomicranges grangeslist • 1.2k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 8 hours ago
United States

This comes from BiocGenerics, in particular the unsafe_replaceSlots function. The code is pretty well commented, so I will point you there for a rationale.

ADD COMMENT
0
Entering edit mode

The comments do not indicate any rationale for this, as far as I can see. Looks like a regression due to 119047, which removed the protecting closure without changing <<- to <-.  I checked a fix for this into devel.

 

ADD REPLY

Login before adding your answer.

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