I recently analysed a transcriptomic dataset with 3 sample groups (4 samples each) and performed a pairwise comparison between the groups. I output the FPMs for the pairwise comparisons and noticed that the same gene in a sample would have a slightly different FPM in each of the comparisons.
example: A gene has the following FPM in one comparison: Sample 1: 476.992795157303, Sample 2: 472.464072441368, Sample 3: 488.11759330905, Sample 4: 461.634140423592
and in the second: Sample 1: 448.229377708702, Sample 2: 449.795231722178, Sample 3: 460.560159012059, Sample 4: 431.705745786016
Is there a reason this would happen? Is it expected?
Example commands run once data was in DESeq:
dds_LactuG <- DESeqDataSetFromMatrix(countData=FCcounts_clean_LactuG, colData=Meta_LactG, design=~condition, tidy = TRUE)
dds_LactuG$condition<-relevel(dds_LactuG$condition, ref="Lactose")
#run DESEQ
dds_LactuG <- DESeq(dds_LactuG)
#get results
res <- results(dds_LactuG)
resOrdered <- res[order(res$pvalue),]
FPM_table <- fpm(dds_LactuG) %>% as.data.frame() %>% rownames_to_column("Geneid")
Thank you for any help!
Thanks for the response I thought that was the situation but wasn't sure.
I would like to get FPMs/FPKMs across all treatments and use those for visuals. Would making a sample set including all samples, with a dummy metadata set, and running DESeq on it to just get FPMs (not using all of the actual results from DESeq) be alright? Is there another way to get one FPM value per sample in these situations?
I would like to use them for visualizations and in supplementary data.
You don't need to subset your data for a pairwise analysis. See the vignette on contrasts. Unless there is a good reason to subset just run DESeq on all samples, then use contrasts for the pairwise analysis and use the FPKMs or any normalized counts from this analysis.