Hi!! I need to try fpkm and fpm on my data for compare with other experiments
I import my data using HTseqcount not txtimport so I have this error:
fpkm(dds1)
Error in fpkm(dds1) : rowRanges(object) has all ranges of zero width.
the user should instead supply a column, mcols(object)$basepairs,
which will be used to produce FPKM values
You can use just fpm() which does not require that you supply a column with the number of basepairs of each gene.
Or, if you're not able to come up with the bp length of each gene as it says in the message above, it may be easier for you to just run software like Salmon, Sailfish or kallisto to produce TPM values (for a sample this is scalar equivalent to FPKM). It takes a few minutes per sample. These software are run from the command line, and can be imported to R with the Bioconductor package tximport.
Hi Michael Love thanks for this. But if I was just to take the TPM from Salmon, this would not be between sample normalised, so would it be fair to compare TPM from Control sample to Treatment sample?
The other question is this: If I want gene level TPM, you cannot get that directly from salmon. I have used tximport to get this into DESeq2 but I am unsure if that does anything with TPM rather than just reads, but then it returns me to the above between-sample normalization issue.
Please forgive my ignorance when it comes to matters of mathematics and stats.
Hi Michael Love thanks for this. But if I was just to take the TPM from Salmon, this would not be between sample normalised, so would it be fair to compare TPM from Control sample to Treatment sample?
The other question is this: If I want gene level TPM, you cannot get that directly from salmon. I have used tximport to get this into DESeq2 but I am unsure if that does anything with TPM rather than just reads, but then it returns me to the above between-sample normalization issue.
Please forgive my ignorance when it comes to matters of mathematics and stats.
You can directly compare TPM across samples for visualization etc.
Gene level TPM can be obtained using tximport (or tximeta). Providing tx2gene gives you an abundance (TPM) matrix.