b2slab / FELLA

FELLA: an R package for Metabolomics data enrichment through diffusion
21 stars 2 forks source link

Convenient function to retrieve compounds belonging to a pathway #14

Open SergiPicart opened 4 years ago

SergiPicart commented 4 years ago

Even if the inclusion is network-based, this has been asked several times

billy-s-lab commented 3 years ago

Hello, Thank you for a great package. When conducting hypergeometric analysis, one can generate a results table using the 'generateResultsTable' function. Example output of such a table below. image

How can I find out what the CompoundHits are? I would like to know which compounds are driving enrichment of certain pathways. Is there a function to extract this data (I couldn't find one) or could you please suggest a manual workaround for this?

I would also be interested to do this for results tables from diffusion analyses too.

Thank you very much for your help.

SergiPicart commented 3 years ago

Dear Billy,

Please check if this question in the bioconductor forums helps listing the compounds for "hypergeom". It suggests a workaround and adds some details on how this would differ from an over representation analysis run directly on the KEGG compound-pathway tables.

Regarding diffusion, the graph is connected so every compound has an "association weight" to each pathway, expected to be very small if both are distant within the network. If you are interested in those weights, they are stored in the kernel matrix, but as the user was not expected to interact with those directly, it is only accessible with FELLA:::getMatrix(). However, the link in the first paragraph should suffice to extend the regular KEGG pathway definitions with indirect connections (i.e. metabolite A not belonging to pathway P directly, but reacting with enzyme B which is in pathway P).

Hope this helps!

billy-s-lab commented 3 years ago

Thank you very much. That really helped - I was able to access the relevant compound IDs for each pathway from hypergeometric analysis.