rtracklayer::import.bed does not close connections.
1
0
Entering edit mode
@charles-plessy-7857
Last seen 6 months ago
Japan

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)
rtracklayer • 1.4k views
ADD COMMENT
2
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States

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

ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Reproducible example?

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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