Hi,
I'm using the groupGO
command in clusterProfiler
to group a subset of (e.g. significantly DE) genes under GO terms. I would like to visualise the results where the relationship between the GO terms, the genes, and their fold changes are shown. To this end, I'm trying to use the cnetplot
function, but the plot I get is incorrect (contains nonsensical terms/nodes). I believe this is because the input to cnetplot
is supposed to be an enrichment result object, not a groupGO
object.
Is there a way to achieve this, i.e. visualising results from groupGO
where individual genes and their fold changes etc. are displayed with their ontology terms? The appoach I'm taking which gives non-sensical cnetplots
plots is the following:
ggo <- groupGO(gene = filt_gene_fc_entrezid,
OrgDb = org.EcK12.eg.db,
ont = 'BP',
level = 3,
readable = TRUE)
cnetplot(ggo, showCategory=5,
categorySize="pvalue",
foldChange=geneList,
order=TRUE)
filt_gene_fc_entrezid
is a vector of gene names that are filtered for a certain log2 fold change value. geneList
is an object that has the fold change information for genes in filt_gene_fc_entrezid
.
Thanks in advance, Ali
the documentation says: "gene - a vector of entrez gene id.", while you supply fold-changes, so my suggestion to to supply a vector of genes.
filt_gene_fc_entrezid
is a vector of genes but apparently also a badly chosen variable name. It's a vector of genes that are filtered for a certain log2 fold change value. I edited the OPI think your original post was saying vector of foldchanges, but ok