lpantano / DEGreport

Create a cromphensive report of DEG list coming from any analysis of RNAseq data
http://lpantano.github.io/DEGreport/
MIT License
23 stars 16 forks source link

New genes that did not exist in dds object suddenly showed up after degPatterns #65

Open sandray-imp opened 5 months ago

sandray-imp commented 5 months ago

Hi, I used the following code to 1) get the significant genes that change based on time of day using LRT, 2) vst transform the data and find clusters based on their expression pattern across the four timepoints (the ZTs). What I found confusing was that there were a few genes (not sure how many in total, but so far I noticed some) that did not exist in objects "dds_Time.lrt" or "cluster_rld", but showed up in "clusters_Time" after degPatterns. The total number of genes/observations in these objects remained the same. Some examples of these genes are mt.Co1, mt.Nd4... I was hoping to know if the package introduces some new reference gene database or if anyone has any idea why there would be gene-level changes post degPatterns. Thank you very much.

res_Time <- results(dds_Time.lrt)
res_Time_df_sig <- as.data.frame(res_Time) %>% dplyr::filter(padj < 0.05)
clustering_sig_genes <- res_Time_df_sig
rld_Time <- vst(dds_Time.lrt, blind = TRUE, fitType = 'parametric')
rld_Time_mat <- assay(rld_Time)
cluster_rld <- subset(rld_Time_mat, rownames(rld_Time_mat) %in% res_Time_df_sig_genes)
ZT.order <- c("ZT3", "ZT9", "ZT15", "ZT21")
colData(dds_Time.lrt)$Time <- factor(colData(dds_Time.lrt)$Time, levels = ZT.order)
clusters_Time <- degPatterns(cluster_rld, metadata=colData(dds_Time.lrt), 
                             time="Time", col=NULL, plot = FALSE, minc = 5)
lpantano commented 2 months ago

Hi,

I missed this. I am not sure, I haven't notice that ever. It is not using anything expect for the matrix you input, so I cannot think of how new genes can appear. Happy to help to debug if you can share your data.