jmw86069 / multienrichjam

Analysis and Visualization of Multiple Gene Set Enrichments
24 stars 4 forks source link

Impossible to install and enrichDF2enrichResult function #2

Closed ederisoud closed 3 years ago

ederisoud commented 4 years ago

Hello

I am very interesting in the function enrichDF2enrichResult but I could not install your package.

At the begining, the package nmormt was the issue because it is not available for 3.6 R version. I downloaded the new version of R (4.0) but the problem is now with jamba which is not available on R 4.0 at the time. How can I do?

Morover, I wanted more information about the input for that function. Which results from GSEA enrichment are require?

Thank you

Emilie

jmw86069 commented 4 years ago

I apologize that I did not get notification of your issue, and just saw it now! (I need to fix my Github settings.)

I am using multienrichjam routinely on R-3.6.1, and from what I can tell the mnormt package is available for the 3.6 R version.

If you have the error message from the multienrichjam install, can you post it? I feel like I may recognize the error and can help prevent similar errors for others. :)

Also, I just tried to install jamba and multienrichjam on R-4.0.2 and both seemed to work for me. That means I'm not testing it the same way you are, or something else is going on for you.

Here is what I did to install:

remotes::install_github("jmw86069/jamba")
remotes::install_github("jmw86069/multienrichjam")

If these do not work for you, let me know and I'll try to fix the problem.

There is sometimes an limit from Github when accessing more than a certain number of repositories. The short summary is they impose a one-hour block, after which try again and it usually succeeds. In future installs it doesn't hit this limit, since most of the packages are already installed.

ederisoud commented 4 years ago

Hello Thank you for this answer.

When I tried the first time, R 4.0.1 was available from one week. I think some packages were not available at this time for this new version because when I tried again today I had no installation issues. As I did not use R since, it is the only possible explanation.

Anyway, thank you for this answer. Could you give me more information about which results from GSEA enrichment are required to run enrichDF2enrichResult function? I am sorry, it is not clear for me.

Tank you very much

Emilie

jmw86069 commented 4 years ago

I admit I have not fully developed the GSEA workflow into multienrichjam. The reason is that GSEA intends to allow flexible list of genes used for enrichment, while the core idea in multienrichjam is to have a fixed gene-pathway incidence matrix.

I think in principle it works, but I have not tested extensively. What is required as input is a data.frame that contains:

The issue may arise when a gene is involved in enrichment of pathwayA, but not in pathwayB -- even if the gene is present in both pathways.

Said another way, imagine this scenario:

Let's imagine pathwayA and pathwayB both contain the gene "ACTB", which is ranked 100 in the ordered list of genes.

That means "ACTB" is involved in enrichment for pathwayA but not pathwayB, even though both pathways contain this gene.

Genes are ultimately condensed to a gene-enrichment incidence matrix, which means "ACTB" will be annotated as a hit since it appears in at least one enrichment result. (In practice this is usually a good thing.)

Similarly, gene-pathway results are condensed to an incidence matrix, and here there may be inconsistencies. If a gene is ever involved in enrichment for a pathway, it will always be associated with that pathway. Similarly, if a gene is never involved in enrichment of a pathway despite being a member of that pathway, even if that gene is involved in enrichment of another pathway -- it will not be included in that pathway.

In general most of these scenarios are probably good outcomes -- and in my experience with GSEA usually the position of the MES (most enriched score) is roughly the same gene rank for most pathways. However I need to do more testing of edge cases. :)

jmw86069 commented 3 years ago

Closing for now, if there are future questions or if you have feedback, feel free to re-open.