How can I display fold change values in my Gene-Concept Network in R?

I am currently developing a Gene-Concept Network plot in R after running differential gene expression analysis on an extensive dataset using the following code which displays a simple plot:

cnetplot(gsea_msigdb_h)

However, I would like to display fold change values so my plot appears similar to the one on this site: Visualization of Functional Enrichment Result.

I tried implementing the following modified code in R based on the suggestion from this site but received the following error:

cnetplot(gsea_msigdb_h,foldChange=geneList) Error in fc_readable(x,
foldChange) : object 'geneList' not found

Any suggestions on how I can modify my code to display colour coded fold change values?

Look I am no expert in enrichment analysis (or R) and I have not worked with this package.

however, I would like to give a try :slight_smile:

I hate to state the obvious, but it seems you do not have an object called geneList

The geneList seems to be a vector with entrez gene number identifiers and their respective fold change. There is an example dataset in the DOSE package from bioconductor called exactly that: "geneList"

Try to make a similar vector
Maybe you have a table or something containing gene number and fold changes
make a vector from the fold change column and name it using the ID number column.

Then use this vector as the foldChange argument

something like

listgenes <- sometable$foldchange
names(listgenes) <- sometable$ID_numbers

cnetplot(gsea_msigdb_h,foldChange=listgenes)

Note: this will not run! Change code according to your naming I do not know your environment setup

Just an idea. Maybe it works.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.