Entering edit mode
Hi,
I would like to know if and how is possible to have a volcano plot (potentially with EnhancedVolcano
) with highlighted not only significant up/down regulated genes but also those genes that have normalised reads (FPKM) higher than a specific value without having to manually specific each gene with selectLab
or if there is any other plot I could you to achieve the same goal:
pvalue < 0.05 + log2FC >1 + FPKM >6
pvalue < 0.05 + log2FC < -1 + FPKM >6
Thank you in advance!
Camilla
Yes, it would be easy enough to highlight such genes. Could you provide the code you have already tested to be able to help you.
well I have total of 480 genes FPKM >6. AT the moment I don't have a specific solution because I must have done something worng which I am not able to figure out yet using
selectLab
(and it should be a really stupid error). but anyway here is my code (in case you can help with one of my problem! :) )It is possible via EnhancedVolcano. The
selectLab
approach would work via compound conditional statements to identify those genes of interest. The other way to do it would be viacolCustom
, like you are already trying. You would just need an extra factor and colour in your current code that identifies those genes that also have FPKM>6. Often the order in which you piece together these multipleifelse()
statements is important.Thanks Kevin!
I am trying to do it but I am able to assign a different color to a subpopulation of genes FPKM >6 but I am not able to have 3 colours at the same time (NS = grey, log2fc+pvalue = either blue or red depending on the trend, log2fc+pvalue+FPKM= green):
At the moment I am trying to add another color only for upregulated genes so I would like to have red point (log2FC >1, pvalue<0.05) and within those green point that are also FPKM>6.
I got is all grey points except for green point (FPKM>6, log2FC >1, pvalue<0.05) but I am not able have in red those that are log2FC>1 + pvalue <0.05.
Here my code (only for the first part):
Also, I have noticed that those green points (total of 5) are "underneath" all the other and only 2 are clearly visible (not sure if it makes sense). Is there any way I can give those 5 points the "priority" ?
Yes, to give priority to certain points / genes, you have to move them to the final positions (rows) in your input object. This will ensure that they are plot in the last place, above (on top of) anything else. This is obviously not desirable for most users, as it involves some extra coding. However, there is no other solution for now.
Regarding the general issue of colouring, basically you should first assign the colours in the order:
, i.e., increasing order of specifity.
That should give you what you want.