Question: Why does a `first_time` object appear when showing GRangesList object?
0
gravatar for ericedwardbryant
2.3 years ago by
ericedwardbryant0 wrote:

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 • 418 views
ADD COMMENTlink modified 2.3 years ago by James W. MacDonald49k • written 2.3 years ago by ericedwardbryant0
Answer: Why does a `first_time` object appear when showing GRangesList object?
0
gravatar for James W. MacDonald
2.3 years ago by
United States
James W. MacDonald49k wrote:

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 COMMENTlink written 2.3 years ago by James W. MacDonald49k

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 REPLYlink modified 2.3 years ago • written 2.3 years ago by Michael Lawrence10k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 148 users visited in the last hour