I have a question I've been meaning to ask for a while. To run DESeq2 I need to provide as input a table of counts without normalizing. For that, I use tximport
which takes all the quants.sf
files of my samples after using salmon
and using a reference I can generate the input needed to run DESeq2
.
I ran:
samples <- list.files(path = ".", full.names = T, pattern="SRR")
files <- file.path(samples, "quant.sf")
names(files) <- str_replace(samples, "./", "") %>% str_replace("ERR", "ERR")
tx2gene <- read.delim("/home/reference_Hsapiens/gene2transcript.coding.txt")
txi <- tximport(files, type="salmon", tx2gene=tx2gene[,c("transcript_id", "gene_id")], countsFromAbundance="lengthScaledTPM")
data <- txi$counts %>% round() %>% data.frame()
My question is: why do I have to use the quants.sf
table with a genes2transcript reference? Can't I just use my quants.genes.sf
table and build a counts table without normalizing using the NumReads column? I feel that this is the same as using tximport
with quants.sf