Hello,
I am trying to import transcript abundances (from kallisto .tsv files) to analyze with DESeq2.
My goal is to do a gene-level and a transcript-level analysis of differential expression. In my kallisto files however, I have several transcripts from unidentified genes which does not allow me to directly compare the gene-level with the transcript-level analysis performed in DESeq2 (since the gene-level approach will only use the transcripts with gene IDs but the transcript-level one will use all transcripts).
To address this I manually edited the Kallisto files to remove the transcripts with no gene ID and restrict my analysis. I did this by opening the files in excel as text, deleting the rows, and saving in the original format.
I was able to import these successfully using tximport and run the analysis to completion about 6 and 4 weeks ago, multiple times.
However, now I am running into an error and cannot repeat the analyses.
I am getting the following message:
> txi.kallisto.tsv<-tximport(files, type="kallisto", tx2gene=tx2gene) reading in files 1 2 Error in Ops.factor(txId, raw[[txIdCol]]) : level sets of factors are different In addition: Warning message: In is.na(e1) | is.na(e2) : longer object length is not a multiple of shorter object length
I have checked that the .tsv files to be imported all have the same number of rows and columns and that the first column is the same in all.
The tx2gene file also has the same number of rows as the .tsv files and column with the transcript IDs also match.
Has anything changed in tximport recently to account for what I am seeing?
Is there another approach that I could use to achieve the same goal: analyze the data in DESeq2 using the same transcripts with and without gene-level summarization?
Thanks in advance!
Clara
Hi,
Thank you for the quick reply! When I supply the tx2gene for the transcripts that can be grouped to a gene, tximport() does tell me which ones are left out. However, if I want to run the same analysis without grouping at the gene level, but only using the transcripts that could be grouped by gene, how can I exclude the other transcripts that are not identified as a certain gene from the transcript-level analysis?
The idea is to determine if the gene-level approach is showing the same trends than a transcript-level approach, but because the transcript-level approach includes unidentified transcripts, it is not exactly a fair comparison per se.
Thank you,
Clara
You can keep/remove transcripts from the matrices that are imported. E.g. if you have the names of transcripts that are in tx2gene, you can do:
Great!! Thank you!
Clara