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)
Did you index with the gencode flag?
Sorry I don't follow. What do you mean by gencode flag?