DEGpatterns and functional analysis of clusters
Entering edit mode
Giulia • 0
Last seen 6 months ago

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 %>% 
           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)
colnames(cluster_rlog) <- myMeta$celltype2

# Extract the Group 1 genes
cluster_groups <- clusters$df
group1 <- clusters$df %>%
  filter(cluster == 1)
          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

DESeq2 RNASeq DEGreport • 339 views
Entering edit mode
Last seen 1 day ago
United States

This question may be more appropriate for a forum like Biostars where you can find points on bioinformatic coding, where you don't need the attention of the package developer in particular. Or you may want to have a few meetings with a bioinformatician who could give some pointers as you are getting started.

The results table has rownames, so you can index the table by rows and by columns. E.g. res[genes,"pvalue"] would give you the pvalues for the genes named in the variable genes.

Entering edit mode

ok! Thanks!

Entering edit mode

Login before adding your answer.

Traffic: 176 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6