"closing unused connection" warning while using a chain / liftover file in rtracklayer
0
0
Entering edit mode
efoss ▴ 10
@efoss-8908
Last seen 3.3 years ago
United States

I used rtracklayer to change the coordinates of a GRanges object from those of human genome hg38 to hg19. I think that everything worked fine, but I got a warning about an unclosed connection. The code is pasted below How should I change things so I don't get this warning?

Thanks.

Eric

> fl <- '/fh/fast/bedalov_a/user/efoss/gene_databases/UCSC/liftover_files/hg38ToHg19.over.chain'
> 
> chainhg38tohg19 <- import(con = fl)
> 
> hg38gr <- GRanges(seqnames = Rle(hg38df[,1]), 
+                   ranges = IRanges(start = hg38df[,2], width = 1), 
+                   strand = Rle(strand(rep('*', nrow(hg38df)))), 
+                   seqlengths = lngths)
> 
> values(hg38gr) <- hg38df[,3:17]
> 
> hg19gr <- liftOver(x = hg38gr, chain = chainhg38tohg19)
Warning message:
In for (i in 2:nargs) { :
  closing unused connection 3 (/fh/fast/bedalov_a/user/efoss/gene_databases/UCSC/liftover_files/hg38ToHg19.over.chain)
>
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.6 LTS

Matrix products: default
BLAS/LAPACK: /app/easybuild/software/OpenBLAS/0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1/lib/libopenblas_prescottp-r0.2.18.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=C               LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] rtracklayer_1.42.2   GenomicRanges_1.34.0 GenomeInfoDb_1.18.2  IRanges_2.16.0       S4Vectors_0.20.1    
[6] BiocGenerics_0.29.2 

loaded via a namespace (and not attached):
 [1] rstudioapi_0.10             XVector_0.22.0              zlibbioc_1.28.0            
 [4] GenomicAlignments_1.18.1    BiocParallel_1.16.6         lattice_0.20-38            
 [7] tools_3.6.0                 SummarizedExperiment_1.12.0 grid_3.6.0                 
[10] Biobase_2.42.0              sessioninfo_1.1.1           cli_1.1.0                  
[13] withr_2.1.2                 matrixStats_0.54.0          assertthat_0.2.1           
[16] yaml_2.2.0                  crayon_1.3.4                Matrix_1.2-17              
[19] GenomeInfoDbData_1.2.0      bitops_1.0-6                RCurl_1.95-4.12            
[22] DelayedArray_0.8.0          compiler_3.6.0              Biostrings_2.50.2          
[25] Rsamtools_1.34.1            XML_3.98-1.19              
> 
"closing unused connection" warning • 542 views
ADD COMMENT

Login before adding your answer.

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