Hello, in brief I performed a gene expression analysis of 14 genes using metagenomes and their respective metatranscriptomes. I calculated reads per million mapped reads (RPM) for each gene.
this is the output data frame of the analysis:
|genes|sample_1|sample2|
------------------------------------
|gene1| 1.425 | 3.53135 |
----------
|gene2| 1.6425 | 3.64325|
----------
|gene3| 0.5315 | 1.53261|
----------
......
|gene14| 0.53532| 1.2522|
----------------------------------
So I'm trying to figure out what is the best way of visualize this data in R , any recommendation?
Thanks for your time
2 answers
What exactly have you struggled with?
For such a small slice of data, a simple correlation coefficient could work. There are easy functions to calculate this from a dataframe both in python and R. A heatmap would probably do the trick as well, but it may be an overkill for two samples and 14 genes. Again, many packages exist in both languages to do this, and they are frequently discussed on this forum.
Hi v.berriosfarias
If you want to compare genes in the same profile, RPM could be used, but is not the best way. TPM has been used as gold standart for this purpose. But if you want to compare genes in the same profile and between profies, R/FPKM is the best way. Complementing your question, heatmap can be used, but 14 can be represented by barcharts, due to small number of genes and conditions.
Best regards, Willian
Log in to answer this question.
What is the message you want to send? Is it expression per sample, or group, absolute, or relative values?
Just to extend @ATpoint's comment: I would take one step back and write down the questions you are bringing to the data, because that will help you craft the message. To compare samples gene by gene you could make a bar plot. To compare sample 1 to sample 2 over all you could make a scatter plot (does x = y?, what @Mensur Dlakic said), etc. Keep in mind that RPM values won't accurately reflect abundance differences between different genes without some consideration for gene length. Always start with questions.