Dear Jora,
Yes, the target length of the gene will be adjusted by the reads in the samples. This actually doesn't make it inaccurate. If the gene consists of different isoform proportions in different samples, it actually makes sense for the gene length to be considered as different.
However, it's also true that the transformation done by tximport is even better than simply scaling the gene length in each sample by the isoform decomposition within that sample. It can look across all samples in the experiment, and determine a global, average gene length that can be best used to compare the abundances between samples. The code you show in your post (from the tximport vignette) is exactly what you want to use. You can use BaseSpace to get the transcript-level results from salmon for your samples. Then you read them into R with tximport as below, and that is where you provide the transcript to gene mapping. Tximport will load all of the data for you, and aggregate the transcript abundances to the gene level. Moreover, it will prepare a dataframe that can be directly passed off to e.g. DESeq2, if you're planning on doing differential expression analysis. On the other hand, if you simply want to do some visualization and comparisons (e.g. look at a PCA of your samples), the dataframe generated by tximport is appropriate for that as well, and you can do that with a few lines as Mike points out here (https://support.bioconductor.org/p/102202/).
I'm glad I could be helpful here.
Best,
Rob
--
Sailfish is available at https://github.com/kingsfordgroup/sailfish
Citation:
Patro, Rob, Stephen M. Mount, and Carl Kingsford. "Sailfish enables alignment-free isoform quantification from RNA-seq reads using lightweight algorithms." Nature biotechnology 32.5 (2014): 462-464.
---
You received this message because you are subscribed to the Google Groups "Sailfish Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sailfish-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sailfish-users/57d722be-9f53-4288-af88-edb157997b0f%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to sailfis...@googlegroups.com.