tximport error: vroom
1
1
Entering edit mode
13 months ago
Maxine ▴ 50

when i trying import a list of salmon counts files quant.sf:

txi <- tximport(files=files, type="salmon", tx2gene=tx2gene[,c("refseq", "entrezid")], countsFromAbundance="lengthScaledTPM")

Rstudio throw me a error:

reading in files with read_tsv
1 Error in vroom_(file, delim = delim %||% col_types$delim, col_names = col_names,  : 
  bad value

why did it happen?

Here are files and tx2gene look like:

> head(files)
                                                       cy201702 
"/Users/maxineliu/work/bufo/RNA/salmon/cy201702_quant/quant.sf" 
                                                       cy201802 
"/Users/maxineliu/work/bufo/RNA/salmon/cy201802_quant/quant.sf" 
                                                       cy201902 
"/Users/maxineliu/work/bufo/RNA/salmon/cy201902_quant/quant.sf" 
                                                       cy202302 
"/Users/maxineliu/work/bufo/RNA/salmon/cy202302_quant/quant.sf" 
                                                       cy202402 
"/Users/maxineliu/work/bufo/RNA/salmon/cy202402_quant/quant.sf" 
                                                       cy202502 
"/Users/maxineliu/work/bufo/RNA/salmon/cy202502_quant/quant.sf"
head(tx2gene[,c("refseq", "entrezid")])
          refseq  entrezid
1 XM_044268240.1 122946843
2 XM_044268241.1 122919300
3 XM_044268242.1 122919300
4 XM_044268243.1 122919300
5 XM_044268244.1 122919301
6 XM_044268245.1 122919299
tximport • 927 views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

yes, please go to the link above to discuss the issue.

ADD REPLY
0
Entering edit mode
13 months ago
Trivas ★ 1.8k

Which version of Salmon are you using? According to the tximport documentation, older versions of quant.sf files from Salmon have comments in the beginning. First, use head on one of your quant.sf files, and if that's the issue, the recommended way to get around this is to add the following to your tximport function:

importer = function(x) read_tsv(x, skip = 8)
ADD COMMENT

Login before adding your answer.

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