Entering edit mode
Hi,
How can i get sizeFactors from sailfish output imported into DESeq2 using tximport. I got NULL after doing the following:
> txi <- tximport(files, type="sailfish", tx2gene=tx2gene, dropInfReps=TRUE) > ddsTxi <- DESeqDataSetFromTximport(txi, colData = samples, design = ~ condition) > estimateSizeFactors(ddsTxi) using 'avgTxLength' from assays(dds), correcting for library size class: DESeqDataSet dim: 39045 5 metadata(1): version assays(3): counts avgTxLength normalizationFactors rownames(39045): ENSG00000000003 ENSG00000000419 ... ENSG00000283698 ENSG00000283699 rowData names(0): colnames(5): sample1 sample2 sample3 sample4 sample5 colData names(1): condition
> sizeFactors(ddsTxi)
NULL
Thanks for the help.
Stan
Thanks a lot Michael,
I noticed normMatrix argument is not used for the estimateSizeFactorsForMatrix function, so instead would it make sense to calculate the geometric mean of each sample (column) from normalizationFactors(dds), and use that as the size factor for each sample?
Or should I just get size factors using:
Alternatively does it make sense to get size factors using this:
Sorry, you are correct. I have a separate function estimateNormFactors(). The code inside this function is:
Thanks again Michael, it's working fine now.
Hi, Michael,
I'm confused...as in my case,
Gives me three different results... If I only want to check the size factor, which one should I choose?
The last one, this is the one I indicated above. The others are not correct for finding the size factors that were calculated and incorporated into normalization factors. The second has no interpretation. The first is the size factors that would be calculated if we ignored the extra information from tximport.
Thanks very much!
Michael Love
I imported transcripts abundance data using DESeqDataSetFromTximport. However, normalizationFactors(ddsTxi) is returning NULL. Is there anything unusual in the following code? I assume that by default
normalizationFactors(ddsTxi)
should return some numbers.It will have normalizationFactors() after you run
estimateSizeFactors()
orDESeq()
. At this step it only haveAvgTxLength
from the effective lengths from Salmon, then weighted average by their abundance within gene (like RSEM does).Note that triple backtick code fencing allows you to code block a region on support site.