DESeqDataSetFromTximport invalid rownames length I am trying to use DESeqDataSetFromTximport function from DESeq2 package to construct dds object:

dds &lt;- DESeqDataSetFromTximport(txi, sampleTable, ~Group)


And somehow it is giving me the following error:


  Error in rownames&lt;-(*tmp*, value = c("ENSMUSG00000000001", "ENSMUSG00000000003",  : 
    invalid rownames length


I used the same code for other datasets but for the current one it is somehow not working. My sampleTable looks like this:

       ID      Group
1    de_1 denervated
2    de_2 denervated
3    de_3 denervated
4    de_4 denervated
5   den_5       sham
6    ho_1        IgG
7    ho_2        IgG
8    ho_3        IgG
9    sh_1       sham
10   sh_2       sham
11   sh_3       sham
12   sh_4       sham
13   sh_5       sham
14 VLA_10  anti-VLA4
15 VLA_12  anti-VLA4
16  VLA_7  anti-VLA4


txi was formed in the following way:

k = keys(txdb, keytype = "GENEID")
df = AnnotationDbi::select(txdb, keys = k, keytype = "GENEID", columns = "TXNAME")
tx2gene = df[, 2:1]  # tx ID, then gene ID
txi &lt;- tximport(names, type = "salmon", tx2gene = tx2gene)


Any suggestions would be greatly appreciated
I got exactly the same problem not long ago (see my other question what I tried to do). We used the same function!

My code ran fine on my HPC but the same code/data failed on my laptop. I later found out I had to upgrade my R to the latest version (3.5.1) and upgrade all my bioconductor packages to the latest. My HPC was on a recent bioconductor docker, so there was no problem.

Please make sure everything in your environment latest (R, R packages, Bioconductor).