Question: Why does a `first_time` object appear when showing GRangesList object?
gravatar for ericedwardbryant
2.7 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

## [1]  "gr"   "grl"

grl   # Show/print the object

## [1] "first_time"  "gr"  "grl"

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

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

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.7 years ago • written 2.7 years ago by Michael Lawrence11k
Please log in to add an answer.


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