Search
Question: rtracklayer::import.bed does not close connections.
0
gravatar for Charles Plessy
19 months ago by
Japan
Charles Plessy90 wrote:

Hello,

Since I upgraded R to version 3.4 and Bioconductor to version 3.5, I have strange warning messages saying closing unused connection after using rtracklayer directly or indirectly (through CAGEr). It seems related to the fact that functions such as import.bed leave open connections behind them. Is that needed or can it be corrected ?

The warning messages happen infrequently, but running multiple times the same import will eventually trigger them. Here is an example.

Restarting R session...

> file <- system.file("tests", "test.bed", package="rtracklayer")

> x <- rtracklayer::import.bed(file)

> showConnections()
  description                                                class  mode text   isopen   can read
3 "/usr/local/lib/R/site-library/rtracklayer/tests/test.bed" "file" "r"  "text" "opened" "yes"   
  can write
3 "no"     

> x <- rtracklayer::import.bed(file)
Warning message:
closing unused connection 4 (/usr/local/lib/R/site-library/rtracklayer/tests/test.bed)
ADD COMMENTlink modified 19 months ago by Michael Lawrence10k • written 19 months ago by Charles Plessy90
2
gravatar for Michael Lawrence
19 months ago by
United States
Michael Lawrence10k wrote:

My bad, it should be fixed in 1.36.1 (release). Also devel.

ADD COMMENTlink written 19 months ago by Michael Lawrence10k

Dear developer,

This problem (at least for import.bed, import.bedGraph) seems still existing in v1.38.3. Connections do not get freed instantly, causing running out of connections in a loop.
 

ADD REPLYlink written 5 months ago by foehn0

Reproducible example?

ADD REPLYlink written 5 months ago by Michael Lawrence10k

Hi Michael, after reinstalling the package (same version), this problem is gone. Now it works no problem for 1000 bed or bedGraph files on Linux and MacOS. Thanks anyway.

ADD REPLYlink written 4 months ago by foehn0
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 2.2.0
Traffic: 234 users visited in the last hour