BaderLab / EnrichmentMapApp

The EnrichmentMap Cytoscape App allows you to visualize the results of gene-set enrichment as a network.
http://apps.cytoscape.org/apps/enrichmentmap
GNU Lesser General Public License v2.1
31 stars 12 forks source link

More than 2 datasets using RCy3 #475

Closed ravipatel4 closed 2 years ago

ravipatel4 commented 2 years ago

Hello,

First of all, thank you for developing such a fantastic tool.

I am trying to generate a network with seven datasets. I have been able to do that successfully using the GUI. However, I am interested in automating this process. I am using RCy3 to do this via R. I am able to recreate the network using two datasets using the following RCy3 command, where I am using enrichmentsDataset1 and enrichmentDataset2 arguments to supply two datasets. However, I don't know how to specify more than two datasets, since there is no option for enrichmentsDataset3, enrichmentsDataset4, etc. Is there an alternative to add more than two datasets to a network using command-line? Here is my RCy3 command for two datasets: enrichmentmap build analysisType=\"generic\" gmtFile=\"Human_GO_AllPathways_no_GO_iea_April_15_2013_symbol_small.gmt\" pvalue= 1 qvalue= 0.1 similaritycutoff= 0.4 coefficients= COMBINED enrichmentsDataset1=\"ds1.txt\" enrichmentsDataset2=\"ds2.txt\" filterByExpressions=false

Thank you in advance.

mikekucera commented 2 years ago

The enrichmentmap build command is an old command that goes back to the 2.X days, it can only handle two datasets.

For 2+ datasets use the enrichmentmap mastermap command. This command creates an EnrichmentMap network containing any number of data sets by scanning files in a folder. Uses the same algorithm as the Create EnrichmentMap Dialog to scan the files in a folder and automatically group them into data sets. Sub-folders will be scanned up to one level deep, allowing you to organize your data sets into sub-folders under the root folder.

To see more documentation for the mastermap command go the the main menu and select Help > Automation > CyREST command API. This will open a browser with swagger documentation for all the available commands. Find and expand the EnrichmentMap section, then find the mastermap command. All the arguments are documented there.

ravipatel4 commented 2 years ago

This is terrific! Thank you for a quick response. I have another unrelated question about enrichmentmap, but I will create another issue with more specific title.

mikekucera commented 2 years ago

I forgot to mention...

At the bottom of the Create EnrichmentMap Dialog there's a button that says "Show Command".

You can use the dialog's UI to set up your datasets and make sure all your files are being found properly, then instead of clicking the "Build" button you can click the "Show Command" button and it will show the enrichmentmap mastermap command with all the arguments set up, and you can just copy-paste it into your R script.