Alternative for wininet method in tximeta
1
0
Entering edit mode
uhlkatie • 0
@uhlkatie-20770
Last seen 2.2 years ago
United States

I am relatively new to RNA-seq analysis, so I have been following the DESEQ2 tutorial with some sample human data. I attempted to use the "tximeta" function to create a summarized experiment, but I was met with the following error:

library(tximeta)
se <- tximeta(coldata)

importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 
found matching transcriptome:
[ GENCODE - Homo sapiens - release 39 ]
useHub=TRUE: checking for TxDb via 'AnnotationHub'
snapshotDate(): 2022-04-21
did not find matching TxDb via 'AnnotationHub'
building TxDb with 'GenomicFeatures' package
Import genomic features from the file as a GRanges object ... Error in download.file(resource(con), destfile) : 
  the 'wininet' method for ftp:// URLs is defunct

It seems that the problem is that 'wininet' no longer works to retrieve the files. I also tried this method:

library("tximport")
library("readr")
library("tximportData")
tx2gene <- read.csv(file.path(dir, "tx2gene.gencode.v27.csv"))

Error in file(file, "rt") : cannot open the connection

The .csv file does not exist in my folders, but I'm not sure how to get it. Does anyone know of an alternative method for the wininet so that tximeta will work? Is there any way to tell tximeta to use a different way of opening files? Any advice would be much appreciated.

DESeq2 tximport tximportData tximeta • 1.5k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 10 hours ago
United States

Try installing the curl package (from CRAN).

Then you should be able to use download.file with ftp addresses (required for tximeta).

I'm not sure if just installing will do the trick. What version of R do you have?

ADD COMMENT
0
Entering edit mode

Hello,

I have R version 4.2.1. I was able to install the curl package successfully. I received the same error message when I tried to run the code.

library(tximeta)
library(curl)
se <- tximeta(coldata)

importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 
found matching transcriptome:
[ GENCODE - Homo sapiens - release 39 ]
useHub=TRUE: checking for TxDb via 'AnnotationHub'
C:\Users\lilab\AppData\Local/R/cache/R/AnnotationHub
  does not exist, create directory? (yes/no):  yes
  |====================================================================| 100%

snapshotDate(): 2022-04-21
did not find matching TxDb via 'AnnotationHub'
building TxDb with 'GenomicFeatures' package
Import genomic features from the file as a GRanges object ... Error in download.file(resource(con), destfile) : 
  the 'wininet' method for ftp:// URLs is defunct
ADD REPLY
0
Entering edit mode

I think you can then change the ?options

download.file.method: Method to be used for download.file. Currently download methods "internal", "wininet" (Windows only), "libcurl", "wget" and "curl" are available. If not set, method = "auto" is chosen: see download.file.

e.g.

options(download.file.method = "libcurl")
ADD REPLY
0
Entering edit mode

This worked perfectly. Thank you!

ADD REPLY

Login before adding your answer.

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