tximport error reading salmon quantification files...
1
1
Entering edit mode
nschurch ▴ 20
@nschurch-10782
Last seen 7.1 years ago

I'm trying to use tximport with salmon quantifications. Initially I had some problems installing tximport because of the version of R (3.3.1) and bioconductor (3.2) installed on our Rstudio server so (while I wait for the guys who maintain that to fix it) I figured I'd install it directly from the bioconductor github site:

library(devtools)
dev_mode(on=T)
install_github("Bioconductor-mirror/tximport")
install_github("hadley/readr")

This went just fine, but when I then try to load some data I get the following error:

library(tximport)
library(readr)
tximp_files <- file.path(exp[[3]], "quant.sf")
txi <- tximport(files, type="salmon", tx2gene=t2g)

reading in files with read_tsv
1 

Error in guess_header_(datasource, tokenizer, locale) : basic_string::resize
9.
stop(structure(list(message = "basic_string::resize", call = guess_header_(datasource, tokenizer, locale), cppstack = NULL), .Names = c("message", "call", "cppstack"), class = c("std::length_error", "C++Error", "error", "condition")))
8.
guess_header_(datasource, tokenizer, locale)
7.
guess_header(ds_header, tokenizer, locale)
6.
col_spec_standardise(data, skip = skip, comment = comment, guess_max = guess_max, col_names = col_names, col_types = col_types, tokenizer = tokenizer, locale = locale)
5.
read_delimited(file, tokenizer, col_names = col_names, col_types = col_types, locale = locale, skip = skip, comment = comment, n_max = n_max, guess_max = guess_max, progress = progress)
4.
readr::read_tsv(x, progress = FALSE, col_types = readr::cols())
3.
importer(files[i])
2.
as.data.frame(importer(files[i]))
1.
tximport(files, type = "salmon", tx2gene = t2g)

The quant.sf data were generated with salmon 0.5.1, the file paths are correct and the files look like:

# salmon (mapping-based) v0.5.1
# [ program ] => salmon 
# [ command ] => quant 
# [ index ] => { /Projects/Arabidopsis_annotations/TAIR10/ensembl/release_26/Sequence/SalmonIndex/transcripts_index_salmon0.5.1_quasi }
# [ libType ] => { ISR }
# [ mates1 ] => { /Projects/salmon/0.5.1_bootstraps/Col-1/R1.fastq }
# [ mates2 ] => { /Projects/salmon/0.5.1_bootstraps/Col-1/R2.fastq }
# [ output ] => { /Projects/salmon/0.5.1_bootstraps/Col-1/TAIR10 }
# [ threads ] => { 8 }
# [ numBootstraps ] => { 100 }
# [ mapping rate ] => { 66.1342% }
# Name    Length    TPM    NumReads
ATMG00010.1    462    1.99872    65
ATMG00030.1    324    4334.17    73792.3
ATMG00040.1    948    11.5158    1018.12
ATMG00050.1    396    0.551205    13.7941
ATMG00060.1    542    564.503    23531.1
ATMG00070.1    573    318.244    14399.1

 

tximport salmon • 2.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

If you already have mis-matched R and Bioconductor versions (R-3.3.1 should be running BioC 3.4, not Bioc 3.2), the fix is probably not to install devel versions of other packages.

Anyway, the error you are getting is from Hadley's readr package, which is not a Bioc package at all. You can always use read.table instead, or alternatively you could install the release version of readr, which is certainly working for me.
 

ADD COMMENT
0
Entering edit mode

Nick,

Can you post the error when installing with biocLite()? This is the installation route that we commit to provide support for, going off that trail you're a bit on your own.

ADD REPLY
0
Entering edit mode

sure, here it is:

> source("https://bioconductor.org/biocLite.R")
Bioconductor version 3.2 (BiocInstaller 1.20.3), ?biocLite for help
> biocLite("tximport")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.3), R 3.3.1 (2016-06-21).
Installing package(s) ‘tximport’
Old packages: 'commonmark', 'mclust', 'R.filesets', 'abind', 'acepack',
  'backports', 'BBmisc', 'BH', 'bookdown', 'broom', 'car', 'checkmate',
  'chron', 'coda', 'colorspace', 'curl', 'data.table', 'DBI', 'DEoptimR',
  'deSolve', 'digest', 'e1071', 'effects', 'energy', 'expm', 'fastcluster',
  'fields', 'futile.logger', 'future', 'GGally', 'ggthemes', 'ggvis', 'git2r',
  'globals', 'gstat', 'httr', 'irlba', 'jsonlite', 'ks', 'Lahman', 'lambda.r',
  'lawstat', 'logcondens', 'loo', 'lubridate', 'MALDIquant', 'maps',
  'matrixStats', 'mclust', 'mime', 'mnormt', 'msm', 'mstate', 'multcomp',
  'multicool', 'mvtnorm', 'NeuralNetTools', 'nlme', 'numDeriv', 'nycflights13',
  'openssl', 'packrat', 'permute', 'plotly', 'plotrix', 'pracma', 'proto',
  'PSCBS', 'psych', 'quantreg', 'R.devices', 'R.filesets', 'R.oo', 'R.rsp',
  'R.utils', 'R6', 'rbokeh', 'Rcpp', 'RcppArmadillo', 'RcppEigen',
  'RefManageR', 'reshape', 'reshape2', 'rgl', 'robustbase', 'roxygen2',
  'rsconnect', 'RSNNS', 'RSQLite', 'rstan', 'rversions', 'scatterplot3d',
  'shiny', 'snow', 'sp', 'spacetime', 'spam', 'SparseM', 'StanHeaders',
  'stringi', 'stringr', 'TH.data', 'tidyr', 'UpSetR', 'vegan', 'VGAM',
  'VGAMdata', 'XML', 'xml2', 'yaml', 'zoo', 'BiocInstaller', 'cluster',
  'codetools', 'foreign', 'lattice', 'Matrix', 'mgcv', 'nlme', 'survival'
Update all/some/none? [a/s/n]: 

Update all/some/none? [a/s/n]:
n
Warning message:
package ‘tximport’ is not available (for R version 3.3.1)
> library(tximport)
Error in library(tximport) : there is no package called ‘tximport’

It's just a warning because of the version mismatch and a failure to install. Looks like I'll just have to suck it up and wait for the sys-admins to upgrade the bioconductor version tot he right one...

ADD REPLY
0
Entering edit mode

Yeah, Bioc 3.2 is from October 2015, so is 1.5 years out of date. tximport was introduced in Bioc 3.3 in April 2016. This information is on the package landing page:

"In Bioconductor since BioC 3.3"
ADD REPLY

Login before adding your answer.

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