Tximport Error ... unable to match up my quant.sf and tx2gene columns
1
0
Entering edit mode
4.1 years ago
2405592M ▴ 140

I got the following error when using Tximport to load my salmon quant.sf files:

None of the transcripts in the quantification files are present in the first column of tx2gene. Check to see that you are using the same annotation for both.

example ID [ENST00000568077.5|ENSG00000130731.16|OTTHUMG00000047855.5|OTTHUMT00000421794.1|METTL26-211|METTL26|588|UTR5:1-41|CDS:42-353|UTR3:354-588|

I know the issue is because i need to have a space between the transcript ID and the |

If I'm using file.path to import all my quant.sf files into R, is there a way of correcting this space issue for all files?

dir <- "/mnt/data/BM/Total_RNAseq/salmon/protein_coding"

files <- file.path(dir, samplefile$sampleID, "quant.sf")

annotation_transcript <- elementMetadata(import(gtf_file, feature.type = "transcript"))

tx2gene <- annotation_transcript[,c("transcript_id", "gene_id")]

txi.salmon <- tximport(files, type = "salmon", tx2gene = tx2gene)
RNA-Seq Tximport salmon • 1.7k views
ADD COMMENT
0
Entering edit mode

Did you index with the gencode flag?

ADD REPLY
0
Entering edit mode

Sorry I don't follow. What do you mean by gencode flag?

ADD REPLY
1
Entering edit mode
4.1 years ago
ATpoint 84k

You apparently used salmon to quantify your reads. This requires an index. You can pass the --gencode flag during indexing so that the transcript name is capped after the first | avoiding the situation you encounter.

Anyway, can you post an example of your tx2gene map and some lines of one of the quant.sf files?

ADD COMMENT
2
Entering edit mode

I fixed the error using the tag you suggested

salmon index -t gencode.vM25.pc_transcripts_filtered.fa -i gencode.vM25.pc_transcripts_f_index --gencode -p 30

Worked beautifully! Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 6780 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6