How can I plot biochemical pathways in terms of fraction of samples that are either up or down regulated from transcriptomic data.
I guess if a similar approach can be used for plotting data from single (in terms of genes up or down in a pathway) or multiple experiments data in terms of samples ?
The relevant section of the methods is "Identification of metabolic pathways with significant expression changes." and "Statistical significance of the observed metabolic pathway expression patterns.".
You need to calculate if a pathway in up or down regulated for each of sample (tumor, condition, strain,...).
You can calculate this with GSVA package to calculate the enrichment score of each pathway per sample plus limma to find if the pathway is differentially expressed in Bioconductor.
Then calculate the fraction of samples that a pathway is significantly differently expressed both up and down-regulated, that is your n and m.
With this information for each pathway you can draw this plot.
Yes, n and m are simple fractions.
The scatterplot will only plot the points for each pathway but then you can add the dashed lines with abline. Check the help of the functions about how do they work.
Thanks. I am new to such analysis and R so its difficult to follow the methods section exactly. Two things:
Just to clarify, this n would be a simple fraction i.e. No. of samples where pathway is upregulated/ Total samples used in analysis ?
And, Can the scatterplot function be used to draw the plot with this dashed line indicating the cut off (20% in this case) ?
Yes, n and m are simple fractions. The scatterplot will only plot the points for each pathway but then you can add the dashed lines with abline. Check the help of the functions about how do they work.