Difference between revisions of "R-GSEA Readme"

From GeneSetEnrichmentAnalysisWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<a href="http://www.broadinstitute.org/gsea/">GSEA Home</a> | <a href="http://www.broadinstitute.org/gsea/downloads.jsp">Downloads</a> | <a href="http://www.broadinstitute.org/gsea/msigdb/">Molecular Signatures Database</a> | Documentation | <a href="http://www.broadinstitute.org/gsea/contact.jsp">Contact</a>  <br />
+
[http://www.broadinstitute.org/gsea/ GSEA Home] |
<br />
+
[http://www.broadinstitute.org/gsea/downloads.jsp Downloads] |  
The GSEA program is provided as an standalone R program, which is available on the [http://www.broadinstitute.org/gsea/software/software_index.html Downloads] page. A readme file included with the R program contains instructions on how to run the program. The readme file is reproduced below for your convenience.<br />
+
[http://www.broadinstitute.org/gsea/msigdb/ Molecular Signatures Database] |  
<br />
+
[http://www.broadinstitute.org/cancer/software/gsea/wiki/index.php/Main_Page Documentation] |
<strong>Note</strong>: The GSEA-P-R program does not include the analysis of preranked gene lists.<br />
+
[http://www.broadinstitute.org/gsea/contact.jsp Contact]
<br />
+
<br>
<hr width="100%" size="2" />
+
<p>The GSEA program is provided as an standalone R program, which is available on the [http://software.broadinstitute.org/gsea/downloads_archive.jsp Archived Downloads] page. Note that the R program was last updated in 2005 and may not work as-is with modern R releases. It is made available for reference purposes only and is no longer maintained or supported.</p>
<br />
+
 
These are the instructions to run the R version of the GSEA program (GSEA-P-R.ZIP). Notice that there is a more user friendly version of GSEA-P written in Java, the GSEA desktop application. If you want to run GSEA and you are not a programmer or a computational biologist that version may be a better choice. The R version is intended for more computational experienced biologists, bioinformaticians or computational biologists. <br />
+
<p>A readme file included with the R program contains instructions on how to run the program. The readme file is reproduced below for your convenience.</p>
<br />
+
 
The GSEA-P-R program described here reflects the version of the methodology described and used in the Subramanian and Tamayo et al 2005 paper. For details about the method and the content of the output please see Supporting Information for that paper.<br />
+
<strong>Note</strong>: The GSEA-P-R program has the following limitations:<br>
<br />
+
<ul>
You need to install R release 2.0 or later.<br />
+
<li>requires exactly two phenotype classes</li>
<br />
+
<li>does not collapse dataset to gene symbols</li>
- Copy the GSEA-P-R.ZIP file to your computer. <br />
+
<li>does not perform permutations by gene_set</li>
- Unzip the file GSEA-P-R.ZIP using the option to create subdirectories.<br />
+
</ul>
&nbsp; This should create the following files and subdirectories:<br />
+
<p>These are the instructions to run the R version of the GSEA program (GSEA-P-R.ZIP). There is a more user friendly version of GSEA-P written in Java, the GSEA desktop application. If you want to run GSEA and you are not a programmer or a computational biologist that version may be a better choice. The R version is intended for more computational experienced biologists, bioinformaticians or computational biologists who are familiar with GSEA algorithm and want to use the R implementation to further explore GSEA method. </p>
<br />
+
<p>The GSEA-P-R program described here reflects the version of the methodology described and used in the Subramanian and Tamayo et al 2005 paper. For details about the method and the content of the output please see Supporting Information for that paper.</p>
GSEA program and functions in R (all the GSEA code is conatined there):<br />
+
<p>You need to install R release 2.0 or later.</p>
<br />
+
<p>
GSEA/GSEA-P-R/GSEA.1.0.R&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br />
+
- Copy the GSEA-P-R.ZIP file to your computer. <br>
<br />
+
- Unzip the file GSEA-P-R.ZIP using the option to create subdirectories.<br>
Directory with input datasets, gct and cls files:<br />
+
&nbsp; This should create the following files and subdirectories:<br>
&nbsp; GSEA/GSEA-P-R/Datasets/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br />
+
</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gender.gct<br />
+
GSEA program and functions in R (all the GSEA code is contained there):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gender.cls<br />
+
GSEA/GSEA-P-R/GSEA.1.0.R<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Leukemia.gct<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Leukemia.cls<br />
+
Directory with input datasets, gct and cls files:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Boston.gct<br />
+
GSEA/GSEA-P-R/Datasets/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Boston.cls<br />
+
Gender.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Michigan.gct<br />
+
Gender.cls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Michigan.cls<br />
+
Leukemia.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Stanford.gct<br />
+
Leukemia.cls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Stanford.cls<br />
+
Lung_Boston.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Bost_maxed_common_Mich_Bost.gct<br />
+
Lung_Boston.cls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Mich_maxed_common_Mich_Bost.gct<br />
+
Lung_Michigan.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P53.gct<br />
+
Lung_Michigan.cls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P53.cls<br />
+
Lung_Stanford.gct<br>
<br />
+
Lung_Stanford.cls<br>
Directory with gene set databases, gmt files:<br />
+
Lung_Bost_maxed_common_Mich_Bost.gct<br>
&nbsp; GSEA/GSEA-P-R/GeneSetDatabases/<br />
+
Lung_Mich_maxed_common_Mich_Bost.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C1.gmt<br />
+
P53.gct<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C2.gmt<br />
+
P53.cls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C3.gmt<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C4.gmt<br />
+
Directory with gene set databases, gmt files:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Boston_poor_outcome.gmt<br />
+
GSEA/GSEA-P-R/GeneSetDatabases/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Michigan_poor_outcome.gmt<br />
+
C1.gmt<br>
<br />
+
C2.gmt<br>
Directories with results of running the examples described in the paper:<br />
+
C3.gmt<br>
<br />
+
C4.gmt<br>
&nbsp; GSEA/GSEA-P-R/Gender_C1/<br />
+
Lung_Boston_poor_outcome.gmt<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gender_C2<br />
+
Lung_Michigan_poor_outcome.gmt<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Leukemia_C1<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Boston_C2<br />
+
Directories with results of running the examples described in the paper:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Stanford_C2 <br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Michigan_C2<br />
+
GSEA/GSEA-P-R/Gender_C1/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Boston_outcome <br />
+
Gender_C2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lung_Michigan_outcome<br />
+
Leukemia_C1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P53_C2<br />
+
Lung_Boston_C2<br>
<br />
+
Lung_Stanford_C2 <br>
The top 20 high scoring gene sets are reported in table S2 (Supporting Information).<br />
+
Lung_Michigan_C2<br>
<br />
+
Lung_Boston_outcome <br>
One page R scripts to run the examples described in the paper:<br />
+
Lung_Michigan_outcome<br>
<br />
+
P53_C2<br>
&nbsp; GSEA/GSEA-P-R/<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Gender_C1.R<br />
+
The top 20 high scoring gene sets are reported in table S2 (Supporting Information).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Gender_C2.R<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Leukemia_C1.R<br />
+
One page R scripts to run the examples described in the paper:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Lung_Boston_C2.R<br />
+
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Lung_Stanford_C2.R<br />
+
GSEA/GSEA-P-R/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Lung_Michigan_C2.R<br />
+
Run.Gender_C1.R<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Lung_Boston_outcome.R<br />
+
Run.Gender_C2.R<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.Lung_Michigan_outcome.R<br />
+
Run.Leukemia_C1.R<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run.P53_C2.R<br />
+
Run.Lung_Boston_C2.R<br>
<br />
+
Run.Lung_Stanford_C2.R<br>
To run, for example, the Leukemia dataset with the C1 gene set database go to the file GSEA/GSEA-P-R/Run.Leukemia_C1.R and change the file pathnames to reflect the location of the GSEA directory in your machine. For example if you expanded the ZIP file under your directory &quot;C:/my_directory&quot; you need to change the line: <br />
+
Run.Lung_Michigan_C2.R<br>
<br />
+
Run.Lung_Boston_outcome.R<br>
GSEA.program.location &lt;- &quot;d:/CGP2005/GSEA/GSEA-P-R/GSEA.1.0.R&quot; &nbsp;<br />
+
Run.Lung_Michigan_outcome.R<br>
<br />
+
Run.P53_C2.R<br>
To:<br />
+
<br>
<br />
+
To run, for example, the Leukemia dataset with the C1 gene set database go to the file GSEA/GSEA-P-R/Run.Leukemia_C1.R and change the file pathnames to reflect the location of the GSEA directory in your machine. For example if you expanded the ZIP file under your directory &quot;C:/my_directory&quot; you need to change the line: <br>
GSEA.program.location &lt;- &quot;c:my_directory/GSEA/GSEA-P-R/GSEA.1.0.R&quot;<br />
+
<br>
<br />
+
<tt>GSEA.program.location &lt;- &quot;d:/CGP2005/GSEA/GSEA-P-R/GSEA.1.0.R&quot;</tt><br >
&nbsp;And the same change to each pathname in that file: you need to replace &quot;d:/CGP2005&quot; with &quot;C&quot;/my_directory&quot;.<br />
+
To:<br><br>
<br />
+
<tt>GSEA.program.location &lt;- &quot;c:my_directory/GSEA/GSEA-P-R/GSEA.1.0.R&quot;</tt><br>
&nbsp;You may also want to change the line:<br />
+
And the same change to each pathname in that file: you need to replace
<br />
+
<tt>&quot;d:/CGP2005&quot; </tt> with <tt>&quot;C&quot;/my_directory&quot;</tt>.<br><br>
doc.string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;Leukemia_C1&quot;,<br />
+
You may also want to change the line:<br><br>
<br />
+
<tt>doc.string = &quot;Leukemia_C1&quot;,</tt><br>
To:<br />
+
<br>To:<br>
<br />
+
<tt>doc.string = &quot;my_run_of_Leukemia_C1&quot;,</tt><br>
doc.string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;my_run_of_Leukemia_C1&quot;,<br />
+
<br>or any other prefix label you want to give your results. This way you won't overwrite the original results that come in those directories and can use them for comparison with the results of you own run. <br>
<br />
+
<p>
or any other prefix label you want to give your results. This way you won't overwrite the original results that come in those directories and can use them for comparison with the results of you own run. <br />
+
After the pathnames have been changed to reflect the location of the directories in your machine to run GSEA program just open the R GUI and paste the content of the <br>
<br />
+
<tt>Run.&lt;example&gt;.R</tt><br>
After the pathnames have been changed to reflect the location of the directories in your machine to run GSEA program just open the R GUI and paste the content of the Run.&lt;example&gt;.R files on it.&nbsp; Fro example to run the Leukemia vs. C1 example use the contents of the file &quot;Run.Leukemia_C1.R&quot; The program is self-contained and should run and produce the results under the directory &quot;C:my_directory/GSEA/GSEA-P-R/Leukemia_C1&quot;. These files are set up with the parameters used in the examples of the paper (e.g. to produce detailed results for the significant and top 20 gene sets). You may want to start using these parameters and change them only when needed and when you get mnore experience with the program. For details of what are the effect of changing some of the parameters see the Supporting Information document.<br />
+
files on it.<br>
<br />
+
For example, to run the Leukemia vs. C1 example, use the contents of the file <tt>&quot;Run.Leukemia_C1.R&quot;</tt>. The program is self-contained and should run and produce the results under the directory <tt>&quot;C:my_directory/GSEA/GSEA-P-R/Leukemia_C1&quot;</tt>. These files are set up with the parameters used in the examples of the paper (e.g. to produce detailed results for the significant and top 20 gene sets). You may want to start using these parameters and change them only when needed and when you get more experience with the program. For details on the effects of changing some of the parameters, see the Supporting Information document.</p>
If you want to run a completely new dataset the easiest way is:<br />
+
If you want to run a completely new dataset the easiest way is:<br>
<br />
+
<ol>
i) Create a new directory: e.g. GSEA/GSEA-P-R/my_dataset, where you can store the inputs and outputs of running GSEA on those files. <br />
+
<li> Create a new directory: e.g. GSEA/GSEA-P-R/my_dataset, where you can store the inputs and outputs of running GSEA on those files. </li>
ii) Convert manually your files to *.gct (expression dataset) and *.cls (phenotype labels)<br />
+
<li>Convert manually your files to *.gct (expression dataset) and *.cls (phenotype labels)</li>
iii) Use Run.Leukemia_C1.R as a template to make a new script to run your data.<br />
+
<li>Use Run.Leukemia_C1.R as a template to make a new script to run your data.</li>
iv) Change the relevant pathnames to point to your input files in directory my_dataset. Change the doc.string to an approprote prefix name for your files.<br />
+
<li>Change the relevant pathnames to point to your input files in directory my_dataset. Change the doc.string to an approprote prefix name for your files.</li>
v) Cut and paste the contents of this new script file in the R GUI to run it. The results will be stored in my_directory.<br />
+
<li>Cut and paste the contents of this new script file in the R GUI to run it. The results will be stored in my_directory.</li>
<br />
+
</ol>
 
The GSEA-P-R program reads input files in *.gct, *.cls and *.gmt formats. As you can see from the examples's files these are simple tab separated ASCII files. If your datasets are not in this format you can use a text editor to convert them. If you start with a tab separated ASCII file, typically the conversion would consist in modifying the header lines on top of the file. Please note that  GSEA-P-R requires that the *.cls file has two and only two phenotype classes.<br />
 
The GSEA-P-R program reads input files in *.gct, *.cls and *.gmt formats. As you can see from the examples's files these are simple tab separated ASCII files. If your datasets are not in this format you can use a text editor to convert them. If you start with a tab separated ASCII file, typically the conversion would consist in modifying the header lines on top of the file. Please note that  GSEA-P-R requires that the *.cls file has two and only two phenotype classes.<br />
 
<br />
 
<br />
 
If you have questions or problems running or using the program please&nbsp; send them to gsea@broadinstitute.org. Also lets us know if you find GSEA a useful tool in your work.
 
If you have questions or problems running or using the program please&nbsp; send them to gsea@broadinstitute.org. Also lets us know if you find GSEA a useful tool in your work.

Latest revision as of 15:29, 28 August 2019

GSEA Home | Downloads | Molecular Signatures Database | Documentation | Contact

The GSEA program is provided as an standalone R program, which is available on the Archived Downloads page. Note that the R program was last updated in 2005 and may not work as-is with modern R releases. It is made available for reference purposes only and is no longer maintained or supported.

A readme file included with the R program contains instructions on how to run the program. The readme file is reproduced below for your convenience.

Note: The GSEA-P-R program has the following limitations:

  • requires exactly two phenotype classes
  • does not collapse dataset to gene symbols
  • does not perform permutations by gene_set

These are the instructions to run the R version of the GSEA program (GSEA-P-R.ZIP). There is a more user friendly version of GSEA-P written in Java, the GSEA desktop application. If you want to run GSEA and you are not a programmer or a computational biologist that version may be a better choice. The R version is intended for more computational experienced biologists, bioinformaticians or computational biologists who are familiar with GSEA algorithm and want to use the R implementation to further explore GSEA method.

The GSEA-P-R program described here reflects the version of the methodology described and used in the Subramanian and Tamayo et al 2005 paper. For details about the method and the content of the output please see Supporting Information for that paper.

You need to install R release 2.0 or later.

- Copy the GSEA-P-R.ZIP file to your computer.
- Unzip the file GSEA-P-R.ZIP using the option to create subdirectories.
  This should create the following files and subdirectories:

GSEA program and functions in R (all the GSEA code is contained there):
GSEA/GSEA-P-R/GSEA.1.0.R

Directory with input datasets, gct and cls files:
GSEA/GSEA-P-R/Datasets/
Gender.gct
Gender.cls
Leukemia.gct
Leukemia.cls
Lung_Boston.gct
Lung_Boston.cls
Lung_Michigan.gct
Lung_Michigan.cls
Lung_Stanford.gct
Lung_Stanford.cls
Lung_Bost_maxed_common_Mich_Bost.gct
Lung_Mich_maxed_common_Mich_Bost.gct
P53.gct
P53.cls

Directory with gene set databases, gmt files:
GSEA/GSEA-P-R/GeneSetDatabases/
C1.gmt
C2.gmt
C3.gmt
C4.gmt
Lung_Boston_poor_outcome.gmt
Lung_Michigan_poor_outcome.gmt

Directories with results of running the examples described in the paper:

GSEA/GSEA-P-R/Gender_C1/
Gender_C2
Leukemia_C1
Lung_Boston_C2
Lung_Stanford_C2
Lung_Michigan_C2
Lung_Boston_outcome
Lung_Michigan_outcome
P53_C2

The top 20 high scoring gene sets are reported in table S2 (Supporting Information).

One page R scripts to run the examples described in the paper:

GSEA/GSEA-P-R/
Run.Gender_C1.R
Run.Gender_C2.R
Run.Leukemia_C1.R
Run.Lung_Boston_C2.R
Run.Lung_Stanford_C2.R
Run.Lung_Michigan_C2.R
Run.Lung_Boston_outcome.R
Run.Lung_Michigan_outcome.R
Run.P53_C2.R

To run, for example, the Leukemia dataset with the C1 gene set database go to the file GSEA/GSEA-P-R/Run.Leukemia_C1.R and change the file pathnames to reflect the location of the GSEA directory in your machine. For example if you expanded the ZIP file under your directory "C:/my_directory" you need to change the line:

GSEA.program.location <- "d:/CGP2005/GSEA/GSEA-P-R/GSEA.1.0.R"
To:

GSEA.program.location <- "c:my_directory/GSEA/GSEA-P-R/GSEA.1.0.R"
And the same change to each pathname in that file: you need to replace "d:/CGP2005" with "C"/my_directory".

You may also want to change the line:

doc.string = "Leukemia_C1",

To:
doc.string = "my_run_of_Leukemia_C1",

or any other prefix label you want to give your results. This way you won't overwrite the original results that come in those directories and can use them for comparison with the results of you own run.

After the pathnames have been changed to reflect the location of the directories in your machine to run GSEA program just open the R GUI and paste the content of the
Run.<example>.R
files on it.
For example, to run the Leukemia vs. C1 example, use the contents of the file "Run.Leukemia_C1.R". The program is self-contained and should run and produce the results under the directory "C:my_directory/GSEA/GSEA-P-R/Leukemia_C1". These files are set up with the parameters used in the examples of the paper (e.g. to produce detailed results for the significant and top 20 gene sets). You may want to start using these parameters and change them only when needed and when you get more experience with the program. For details on the effects of changing some of the parameters, see the Supporting Information document.

If you want to run a completely new dataset the easiest way is:

  1. Create a new directory: e.g. GSEA/GSEA-P-R/my_dataset, where you can store the inputs and outputs of running GSEA on those files.
  2. Convert manually your files to *.gct (expression dataset) and *.cls (phenotype labels)
  3. Use Run.Leukemia_C1.R as a template to make a new script to run your data.
  4. Change the relevant pathnames to point to your input files in directory my_dataset. Change the doc.string to an approprote prefix name for your files.
  5. Cut and paste the contents of this new script file in the R GUI to run it. The results will be stored in my_directory.

The GSEA-P-R program reads input files in *.gct, *.cls and *.gmt formats. As you can see from the examples's files these are simple tab separated ASCII files. If your datasets are not in this format you can use a text editor to convert them. If you start with a tab separated ASCII file, typically the conversion would consist in modifying the header lines on top of the file. Please note that GSEA-P-R requires that the *.cls file has two and only two phenotype classes.

If you have questions or problems running or using the program please  send them to gsea@broadinstitute.org. Also lets us know if you find GSEA a useful tool in your work.