Good morning, I'm new in R programming (only 5 months) I have RNAseq data that I've analyzed with DESeq2. I wanted to perform a timecourse analysis to indentify gene module among different cell subpopulations. I performed LRT test and then I applied DEGpattern from DEGreport package. I obtained several clusters and now I want to perform functional analysis to explore associated functions of the gene groups of interest. But I had only the list of genes and the cluster. How can I exctract data (Fold Change, pvalue etc...) regarding specifical cluster genes from my DESeq2 results dataframe?
dds <- DESeqDataSetFromMatrix(countData = myMatrix, colData = myMeta, design = ~ celltype2) dds_LRT <- DESeq(dds, test = "LRT", reduced= ~1) res_LRT <- results(object = dds_LRT, ) # Subset results for faster cluster finding sig_res_LRT <- res_LRT%>% data.frame() %>% rownames_to_column(var="gene") %>% as_tibble() %>% filter(padj < 10^(-5)) sigLRT_genes <- sig_res_LRT %>% pull(gene) write.csv(sig_res_LRT, file= "Timecourse/DEG_000001.csv") rld <- rlogTransformation(dds_LRT) rld_mat <- assay(rld) # Obtain rlog values for those significant genes cluster_rlog <- rld_mat[sigLRT_genes, ] #`degPatterns` function from the 'DEGreport' package to show gene clusters across sample groups png(filename = "Timecourse/Clusters.png", width = 800, height = 600) clusters <- degPatterns(cluster_rlog, metadata = myMeta, time = "celltype2", col = NULL, plot = T) dev.off() colnames(cluster_rlog) <- myMeta$celltype2 # Extract the Group 1 genes cluster_groups <- clusters$df group1 <- clusters$df %>% filter(cluster == 1) write.csv(group1, file= "Timecourse/Clusters/Cluster_1_genelist.csv")
to perform GO analysis through clusterProfile, I need other data, like FC etc., in addition to the gene list of one specific cluster, doesn't it? Thanks in advance