#LyX 1.6.4 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass book
\use_default_options true
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Section
Enrichment analysis
\end_layout

\begin_layout Standard
Enrichment analysis consists in a quantitative measure to infer if the values
 of a biological condition (e.g.
 fold changes) shows statistically significant, concordant values or increased
 proportion for a particular set of biological annotations (module or gene
 set).
 
\end_layout

\begin_layout Subsection
How to run an enrichment analysis
\end_layout

\begin_layout Standard
Before running an enrichment analysis you should have this data prepared
 in files:
\end_layout

\begin_layout Itemize
A matrix with the data resulting of your experiment (i.e.
 an expression matrix) or a list or lists of elements (i.e.
 genes or probesets) that has been found significant after other analysis
 (i.e.
 after differential expression you get lists of genes over and under expressed).
\end_layout

\begin_layout Itemize
A list of all elements (i.e.
 probesets or genes) that conform the background population of your analysis.
 For example, in the case of an affymetrix microarray the population would
 be all the probesets of the microarray.
 This is not necessary if you have a matrix with data for the whole population.
\end_layout

\begin_layout Itemize
Modules (i.e.
 gene sets related by Gene Ontology biological process) to analyze enrichment
 for.
\end_layout

\begin_layout Standard
To start the enrichment wizard go to the menu 
\emph on
File > New > Analysis > Enrichment analysis ...

\emph default
 
\end_layout

\begin_layout Subsubsection*
Selection of the destination file
\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename images/analysis_enrichment_destination_file.png
	lyxscale 50

\end_inset


\end_layout

\begin_layout Standard
The first wizard page allows to specify the prefix name for the files generated
 during the analysis and the folder where they will be created.
 The text in 
\emph on
name
\emph default
 and 
\emph on
folder
\emph default
 can be freely edited but it is also possible to navigate through system
 folders in order to select one pressing the button 
\emph on
[Browse]
\emph default
.
\end_layout

\begin_layout Subsubsection*
Selection of the data
\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename images/analysis_enrichment_data.png
	lyxscale 50

\end_inset


\end_layout

\begin_layout Paragraph
Data format & Data file
\end_layout

\begin_layout Standard
A file containing the data can be selected pressing the button [Browse...]
 and selecting a file.
 The format of the file will be automatically detected if the file extension
 matches any of the known file formats, otherwise a warning will appear
 and it should be the user who selects the appropiate format.
 
\begin_inset Note Note
status open

\begin_layout Plain Layout
Reference formats section
\end_layout

\end_inset


\end_layout

\begin_layout Paragraph
Population file
\end_layout

\begin_layout Standard
This field can be left blank if the data file contains data for all background
 elements, otherwise a file with the elements of the background population
 should be selected.
 The format of this file is a simple text file with one element per line.
 For example the list of all the protein coding genes, each one in a different
 row.
 
\begin_inset Note Note
status open

\begin_layout Plain Layout
Reference formats section
\end_layout

\end_inset


\end_layout

\begin_layout Paragraph
Filter rows by label
\end_layout

\begin_layout Standard
\begin_inset Note Greyedout
status open

\begin_layout Plain Layout
This feature is not yet implemented but will allow to select a subset of
 rows of the data file using a list of labels from another file.
\end_layout

\end_inset


\end_layout

\begin_layout Paragraph
Transform to 1 / 0
\end_layout

\begin_layout Standard
Some statistical tests are designed to work with discrete events (as Binomial
 or Fisher's exact tests), this option allows to transform a matrix with
 real values into a binary matrix containing only 1's and 0's for the analysis.
 All the values which satisfy the condition will be transformed to 1 and
 the rest to 0.
 For example, if the data file is an expression matrix with log
\begin_inset Formula $_{2}$
\end_inset

 ratios it can be transformed to a binary matrix having a 1 for all the
 log
\begin_inset Formula $_{2}$
\end_inset

 ratios greater than 1.5.
 Other possible application is when the matrix have p-values, if a significance
 of 0.05 is considered, all values less than 0.05 could be transformed to
 1's.
\end_layout

\begin_layout Paragraph
Filter out rows for which no information appears in the module
\end_layout

\begin_layout Standard
Sometimes is conveniento to restrict the background population to only those
 elements belonging to any module, for example, the data file could have
 information for all the genes of a microarray but only the genes with GO
 biological process annotations should be considered for the background.
\end_layout

\begin_layout Subsubsection*
Selection of the modules
\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename images/analysis_enrichment_modules.png
	lyxscale 50

\end_inset


\end_layout

\begin_layout Paragraph
File format & File
\end_layout

\begin_layout Standard
A file containing the modules information can be selected pressing the button
 [Browse...] and selecting a file.
 The format of the file will be automatically detected if the file extension
 matches any of the known file formats, otherwise a warning will appear
 and it should be the user who selects the appropiate format.
 
\begin_inset Note Note
status open

\begin_layout Plain Layout
Reference formats section
\end_layout

\end_inset


\end_layout

\begin_layout Paragraph
Modules filtering
\end_layout

\begin_layout Standard
If the number of elements of one module is too low some tests could not
 generate reliable results (i.e.
 zscore or bionamial tests), on the other hand there are tests best suited
 for small modules like fisher's exact test.
 It is possible to discard the modules with less or more than a certain
 quantity using this filters.
\end_layout

\begin_layout Subsubsection*
Selection of the test
\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename images/analysis_enrichment_test.png
	lyxscale 50

\end_inset


\end_layout

\begin_layout Standard
There are different kind of statistical tests that can be used, in this
 page the user can select the one that he/she wants to use.
 See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:statistical-tests"

\end_inset

 for more details.
\end_layout

\begin_layout Subsubsection*
Analysis details
\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename images/analysis_enrichment_details.png
	lyxscale 50

\end_inset


\end_layout

\begin_layout Standard
This step is optional but recommended as it allows to give some details
 about the analysis for better organization and annotation of the results
 for future reviews.
\end_layout

\begin_layout Standard
It will be possible to specify free attributes for the analysis as Organization,
 Operator, Platform and so forth but it is not finished yet.
 Note that this option is already available through command line interface.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "sub:statistical-tests"

\end_inset

How is this calculated ?
\end_layout

\begin_layout Standard
Currently there are three different statistical tests implemented for enrichment
 analysis in Gitools.
\end_layout

\begin_layout Standard
\begin_inset Note Greyedout
status open

\begin_layout Plain Layout
We are preparing some detailed information about the implemented tests but
 it is not ready yet.
 Meanwhile you can search in the wikipedia for the tests to have an overall
 idea.
\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection*
Binomial (Bernoulli) test
\end_layout

\begin_layout Standard
\begin_inset Note Greyedout
status open

\begin_layout Plain Layout
This part of the documentation is still missing.
\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection*
Fisher's exact test
\end_layout

\begin_layout Standard
\begin_inset Note Greyedout
status open

\begin_layout Plain Layout
This part of the documentation is still missing.
\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection*
Z-score test
\end_layout

\begin_layout Standard
\begin_inset Note Note
status open

\begin_layout Plain Layout
Elaborate more on this.
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The Z-score test is used to see if there is a significant deviation from
 random expectation for an estimator value (mean or median) of each module
 in each of the conditions:
\end_layout

\begin_layout Standard
\begin_inset Formula $Z_{i}=\frac{(X-\mu_{i})}{\sigma_{i}}$
\end_inset

 
\end_layout

\begin_layout Standard
where 
\begin_inset Formula $\mu_{i}$
\end_inset

 is the mean and 
\begin_inset Formula $\sigma_{i}$
\end_inset

 is the standard deviation of the estimator for different permutations for
 condition i.
\end_layout

\end_body
\end_document
