saezlab / MetaProViz

R-package to perform metabolomics pre-processing, differential metabolite analysis, metabolite clustering and custom visualisations.
https://saezlab.github.io/MetaProViz/
GNU General Public License v3.0
8 stars 0 forks source link

Volcano plot pathway names #13

Closed ChristinaSchmidt1 closed 1 year ago

ChristinaSchmidt1 commented 1 year ago

In the Volcano plot function we have specific pathway names within the plot. We need to change this, so the users pathway names are automatically used.

dprymidis commented 1 year ago

Done.

I added the safe_colorblind_palette which we use for the Alluvial plot adn added some adittional colors to be safe that they are more than the pathways. We have the parameter Input data which has the data and Input_Pathways which must have a column Metabolite and Pathway. It can be the same input as the Input_data is we added Input in the DMA function, or it can be a separate dataframe If we want to check another pathway list. It takes and assignes a color to each metabolite based on the pathway it falls into from the pathways in the Input_Pathway dataframe.

ChristinaSchmidt1 commented 1 year ago

Thanks, this looks nice! Lets add to "Check input files" a warning/stop that more pathways than colours are present and recommend to summarise sub-pathways together where possible. (Sorry if this is somewhere in the code and I missed it; I just searched for warnings and stops).

dprymidis commented 1 year ago

I added this: (lines 795-797 in Visualization) if (length(unique(Input_pathways$Pathway)) > length(safe_colorblind_palette)){ stop(" The maximum number of pathways in the Input_pathways must be less than ",length(safe_colorblind_palette),". Please summarize sub-pathways together where possible and repeat.") }

the safe_colorblind_palette is the colors we use.

ChristinaSchmidt1 commented 1 year ago

Thank you!