tximport error: vroom
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
• 1,578 views
•
link
1 answer
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)
• 0 views
•
link
Log in to answer this question.
Cross-posted: https://support.bioconductor.org/p/9154550/
yes, please go to the link above to discuss the issue.