thelovelab/tximport

Error against the result of salmon with option --numBootstraps

Closed this issue · 1 comments

Hi, @mikelove

I tried to perform tximport against the result files of salmon,
but it seems not properly be performed.

library("tximport")
srr <- paste0("SRR", 3670977:3670992)
file_salmon_options <- file.path("analysis/salmon_options", srr, "quant.sf")
names(file_salmon_options) <- srr
txi.salmon_options <- tximport(
	file_salmon_options, type="salmon", txOut=TRUE)
# reading in files with read_tsv
# 1 Error in readBin(bootCon, "integer", n = expected.n) :
#  invalid 'n' argument

The job of salmon is performed with the option "--numBootstraps 100",
and I think this part might be related to the error,
because the error is related to a metadata file (meta_info.json),
which is saved in the directory containing the result of salmon,
and specifying the option changes the value of "num_bootstraps" as 100.
https://github.com/mikelove/tximport/blob/8373c95d36fd342f2f53598ef6bc984021a982b2/R/infReps.R#L75

Could you confirm that this error is reproduced in your environment?

The script of the salmon I performed is this:

#!/bin/bash

srrs=({77..92})

for srr in ${srrs[@]}; do
	tools/salmon-latest_linux_x86_64/bin/salmon \
	quant \
	-i data/transcripts_index_salmon \
	-p 4 \
	-l A \
	--numBootstraps 100 \
	--seqBias \
	--gcBias \
	--posBias \
	-r data/SRR36709${srr}.fastq.gz \
	-o analysis/salmon_options/SRR36709${srr}
done

and the results of salmon I performed is here↓
https://www.dropbox.com/s/qw495oagjj5wb8l/analysis.zip?dl=0

The result of sessionInfo is as follows.

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /home/koki/Software/R-3.5.0/lib/libRblas.so
LAPACK: /home/koki/Software/R-3.5.0/lib/libRlapack.so

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

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

other attached packages:
[1] readr_1.3.1    jsonlite_1.6   tximport_1.8.0

loaded via a namespace (and not attached):
 [1] compiler_3.5.0  R6_2.4.0        hms_0.4.2       tools_3.5.0
 [5] rhdf5_2.24.0    pillar_1.4.1    tibble_2.1.3    Rcpp_0.12.19
 [9] crayon_1.3.4    pkgconfig_2.0.2 rlang_0.3.0.1   Rhdf5lib_1.2.1

This should be fixed, see Issues and Bioc support posts from yesterday.