I'm trying to run a differential expression analysis of 2 samples of the same species, but with different treatments using DESeq2. I'm using Ensembldb to create a tx2gene dataframe for tximport, however tximport does not select the columns I specify, and instead always selects the tx_biotype leading to the following output:

.                    25_quant    28_quant
nontranslating_CDS    10422.41    10022.74
protein_coding     22196722.59 24002269.26

I'm running tximport using the following params:

txi_tx <- tximport(files, type = "salmon", tx2gene = tx2gene,
                   txIdCol = "tx_id", geneIdCol = "gene_id")

I've gotten around this by deleting all columns from my tx2gene DF apart from tx_id and gene_id. However, I think this might be causing problems in the DESeq2 analysis somehow, and I would like to rule out that possibility.

This is what my names(tx2gene) looks like:

"tx_id"            "tx_biotype"       "tx_seq_start"     "tx_seq_end"
"tx_cds_seq_start" "tx_cds_seq_end"  
"gene_id"          "tx_name"

What am I doing wrong?


1 Answer 1


By setting type="salmon" you're overriding your settings for things like txIdCol. The various type options (except none) are presets to set things correctly for the output from various programs like salmon or kallisto. If you need to specify custom column names, set type="none".

As an aside, if I'm interpreting your question correctly you have only two samples in total. You can not perform a meaningful analysis with an unreplicated experiment, so if that is indeed your case then don't waste your time further with this dataset.

  • $\begingroup$ Thank you, that explains it. As for the lack of replicates this is for an undergraduate research project, and we're just trying to get our R code to work until we get actual data. $\endgroup$
    – wolff
    May 3, 2018 at 18:06
  • 1
    $\begingroup$ Ah download a public dataset and try to reproduce a published analysis with that. If you can set similarish (or better!) results as those published then you're good to go :) $\endgroup$
    – Devon Ryan
    May 3, 2018 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.