This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in tximport(files, type = "kallisto", tx2gene = tx2gene, reader = read_tsv) : unused argument (reader = read_tsv)

I am having this error when running tximport. What the Error massage means?

txi <- tximport(files, type = "kallisto", tx2gene = tx2gene, reader = read_tsv) Error in tximport(files, type = "kallisto", tx2gene = tx2gene, reader = read_tsv) : unused argument (reader = read_tsv)

r

1 answer

It means that this option does not exist. From the manual (first hit when using a prominent search engine for "tximport reader"):

A change from version 1.2 to 1.4 is that the reader is not specified by the user anymore, but chosen automatically based on the availability of the readr package. Advanced users can still customize the import of files using the importer argument.

Ok thanks, but, how to fix it "unused argument (reader = read_tsv)"

Remove that argument from the command you run, the reader is being it is autodetected. If the readr package is installed the tool will use it automatically, otherwise it will use something else.

Ok, I removed the argument. Now, it is giving me the following error.

txi <- tximport(files, type="kallisto", tx2gene=tx2gene) Error in tximport(files, type = "kallisto", tx2gene = tx2gene) : length(files) > 0 is not TRUE

The bellow is my proceeding codes;

samples <- read.table(file.path(dir, "sorted.txt"), header = TRUE) files <- file.path(dir, "kallisto", samples$run, "abundance.tsv") names(files) <- paste0("sample", 1:6) Error in names(files) <- paste0("sample", 1:6) : 'names' attribute [6] must be the same length as the vector [0] all(file.exists(files)) [1] TRUE

Log in to answer this question.