Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lemieuxl committed Sep 11, 2015
2 parents 9aef50c + 08cb927 commit dc1f408
Show file tree
Hide file tree
Showing 23 changed files with 1,053 additions and 126 deletions.
13 changes: 9 additions & 4 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# genipe - A Python module to perform genome-wide imputation analysis

*Version 1.2.1*
*Version 1.2.2*

The `genipe` module (standing for **GEN**ome-wide **I**mputation
**P**ipelin**E**) includes a script (named `genipe-launcher`) that
Expand Down Expand Up @@ -40,7 +40,7 @@ The tool requires a standard [Python](http://python.org/) 3 installation with
the following modules:

* `numpy` version 1.8.2 and latest
* `jinja2` version 2.7.3 and latest
* `Jinja2` version 2.7.3 and latest
* `pandas` version 0.15.2 and latest
* `setuptools` version 12.0.5 and latest

Expand Down Expand Up @@ -103,9 +103,10 @@ usage: genipe-launcher [-h] [-v] [--debug] [--thread THREAD] --bfile PREFIX
[--probability FLOAT] [--completion FLOAT]
[--info FLOAT] [--report-number NB]
[--report-title TITLE] [--report-author AUTHOR]
[--report-background BACKGROUND]

Execute the genome-wide imputation pipeline. This script is part of the
'genipe' package, version 1.2.1.
'genipe' package, version 1.2.2.

optional arguments:
-h, --help show this help message and exit
Expand Down Expand Up @@ -174,6 +175,10 @@ Automatic Report Options:
imputation]
--report-author AUTHOR
The report author. [Automatically generated by genipe]
--report-background BACKGROUND
The report background section (can either be a string
or a file containing the background. [General
background]
```


Expand Down Expand Up @@ -212,7 +217,7 @@ usage: imputed-stats [-h] [-v] {cox,linear,logistic,mixedlm,skat} ...

Performs statistical analysis on imputed data (either SKAT analysis, or
linear, logistic or survival regression). This script is part of the 'genipe'
package, version 1.2.1).
package, version 1.2.2).

optional arguments:
-h, --help show this help message and exit
Expand Down
Binary file modified docs/_static/tutorial/report.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,6 @@
intersphinx_mapping = {
'https://docs.python.org/3.4': None,
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'pandas': ('http://pandas.pydata.org/pandas-docs/dev', None),
'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),
'jinja2': ('http://jinja.pocoo.org/docs', None),
}
7 changes: 6 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ Usage
[--probability FLOAT] [--completion FLOAT]
[--info FLOAT] [--report-number NB]
[--report-title TITLE] [--report-author AUTHOR]
[--report-background BACKGROUND]
Execute the genome-wide imputation pipeline. This script is part of the
'genipe' package, version 1.2.1.
'genipe' package, version 1.2.2.
optional arguments:
-h, --help show this help message and exit
Expand Down Expand Up @@ -126,6 +127,10 @@ Usage
imputation]
--report-author AUTHOR
The report author. [Automatically generated by genipe]
--report-background BACKGROUND
The report background section (can either be a string
or a file containing the background. [General
background]
About
Expand Down
87 changes: 87 additions & 0 deletions docs/tutorials/tutorial_SKAT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Quick navigation
3. :ref:`skat-tut-3`
4. :ref:`skat-tut-4`
5. :ref:`skat-tut-5`
6. :ref:`skat-tut-6`

SKAT analysis tutorial
-----------------------
Expand Down Expand Up @@ -130,6 +131,7 @@ thresholds.
Only the variants in this file will be considered by the ``imputed-stats``
tool.


.. _skat-tut-2:

Creating a SNP sets file
Expand Down Expand Up @@ -189,6 +191,7 @@ variants. If you want to use custom weights based on something la
deleteriousness prediction, you need to generate the weights manually and
provide them in the SNP set file as shown here.


.. _skat-tut-3:

Format for the phenotypes file
Expand Down Expand Up @@ -220,6 +223,7 @@ file, as well as covariates. The covariates are included in the analysis using
the ``--covar`` argument and the variable type of the outcome is given using
the ``--outcome-type`` argument which can be set to `discrete` or `continuous`.


.. _skat-tut-4:

Running the script
Expand Down Expand Up @@ -282,6 +286,7 @@ The line by line explanation of this command is as follows:
Also note that the SKAT-O algorithm can be used by using the ``--skat-o``
flag.


.. _skat-tut-5:

Results
Expand Down Expand Up @@ -314,3 +319,85 @@ If you have any questions or problems, don't hesitate to contact us through our

We are also very open to suggestions and improvements. If you have developed a
new interesting feature, please send us a push request from Github.


.. _skat-tut-6:

Usage
^^^^^^

The following command will display the documentation for the SKAT analysis in
the console:

.. code-block:: console
$ imputed-stats skat --help
usage: imputed-stats skat [-h] [-v] [--debug] --impute2 FILE --sample FILE
--pheno FILE [--extract-sites FILE] [--out FILE]
[--nb-process INT] [--nb-lines INT] [--chrx]
[--gender-column NAME] [--scale INT] [--prob FLOAT]
[--maf FLOAT] [--covar NAME] [--categorical NAME]
[--missing-value NAME] [--sample-column NAME]
[--interaction NAME] --snp-sets FILE --outcome-type
{continuous,discrete} [--skat-o] --pheno-name NAME
Uses the SKAT R package to analyze user defined gene sets. This script is part
of the 'genipe' package, version 1.2.2).
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
--debug set the logging level to debug
Input Files:
--impute2 FILE The output from IMPUTE2.
--sample FILE The sample file (the order should be the same as in
the IMPUTE2 files).
--pheno FILE The file containing phenotypes and co variables.
--extract-sites FILE A list of sites to extract for analysis (optional).
Output Options:
--out FILE The prefix for the output files. [imputed_stats]
General Options:
--nb-process INT The number of process to use. [1]
--nb-lines INT The number of line to read at a time. [1000]
--chrx The analysis is performed for the non pseudo-autosomal
region of the chromosome X (male dosage will be
divided by 2 to get values [0, 0.5] instead of [0, 1])
(males are coded as 1 and option '--gender-column'
should be used).
--gender-column NAME The name of the gender column (use to exclude samples
with unknown gender (i.e. not 1, male, or 2, female).
If gender not available, use 'None'. [Gender]
Dosage Options:
--scale INT Scale dosage so that values are in [0, n] (possible
values are 1 (no scaling) or 2). [2]
--prob FLOAT The minimal probability for which a genotype should be
considered. [>=0.9]
--maf FLOAT Minor allele frequency threshold for which marker will
be skipped. [<0.01]
Phenotype Options:
--covar NAME The co variable names (in the phenotype file),
separated by coma.
--categorical NAME The name of the variables that are categorical (note
that the gender is always categorical). The variables
are separated by coma.
--missing-value NAME The missing value in the phenotype file.
--sample-column NAME The name of the sample ID column (in the phenotype
file). [sample_id]
--interaction NAME Add an interaction between the genotype and this
variable.
SKAT Options:
--snp-sets FILE A file indicating a snp_set and an optional weight for
every variant.
--outcome-type {continuous,discrete}
The variable type for the outcome. This will be passed
to SKAT.
--skat-o By default, the regular SKAT is used. Setting this
flag will use the SKAT-O algorithm instead.
--pheno-name NAME The phenotype.
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_cox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ in the console:
NAME
Performs a survival regression on imputed data using Cox's proportional hazard
model. This script is part of the 'genipe' package, version 1.2.1).
model. This script is part of the 'genipe' package, version 1.2.2).
optional arguments:
-h, --help show this help message and exit
Expand Down
13 changes: 12 additions & 1 deletion docs/tutorials/tutorial_extract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ The following example shows two lines of the ``.impute2`` file.
22 rs7289830 16058758 C A 0 0 1 0 0 1 0 1 0 ...
22 rs6423472 16087621 A G 0 1 0 1 0 0 0 1 0 ...
.. note::

When extracting using the ``impute2`` format, all the existing companion
files (``.maf``, ``.map``, etc.) will also be extracted and included in the
same directory (using the same output prefix).


``.dosage`` file
"""""""""""""""""
Expand Down Expand Up @@ -239,7 +245,7 @@ analysis in the console:
[--rate FLOAT] [--info FLOAT]
Extract imputed markers located in a specific genomic region. This script is
part of the 'genipe' package, version 1.2.1).
part of the 'genipe' package, version 1.2.2).
optional arguments:
-h, --help show this help message and exit
Expand Down Expand Up @@ -277,3 +283,8 @@ analysis in the console:
the specified threshold. Can be use in combination
with '--maf', '--rate' and '--genomic'.
.. note::

When using the ``--index`` option, only the indexation (of files without an
index) will be performed.

10 changes: 8 additions & 2 deletions docs/tutorials/tutorial_genipe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ genome-wide imputation of the *HapMap* CEU dataset.
``--impute2-bin`` and/or the ``--plink-bin`` options if the SHAPEIT, IMPUTE2
and/or the Plink binaries are in the ``PATH`` variable.

The following table describes the option used by :py:mod:`genipe` in the
previous command (see the :ref:`genipe-usage` section for a full list):
The following table describes the options **used by** :py:mod:`genipe` **in the
previous command** (see the :ref:`genipe-usage` section for a full list):

.. table::

Expand Down Expand Up @@ -411,6 +411,12 @@ previous command (see the :ref:`genipe-usage` section for a full list):
subsequent steps).


.. note::

Four options will modify the report content: ``--report-number``,
``--report-title``, ``--report-author`` and ``--report-background``.


.. _genipe-tut-compile-report:

Compiling the report
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_linear.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ analysis in the console:
--pheno-name NAME
Performs a linear regression (ordinary least squares) on imputed data. This
script is part of the 'genipe' package, version 1.2.1).
script is part of the 'genipe' package, version 1.2.2).
optional arguments:
-h, --help show this help message and exit
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_logistic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ regression analysis in the console:
--pheno-name NAME
Performs a logistic regression on imputed data using a GLM with a binomial
distribution. This script is part of the 'genipe' package, version 1.2.1).
distribution. This script is part of the 'genipe' package, version 1.2.2).
optional arguments:
-h, --help show this help message and exit
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_mixedlm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ effects analysis in the console:
Performs a linear mixed effects regression on imputed data using a random
intercept for each group. This script is part of the 'genipe' package, version
1.2.1).
1.2.2).
optional arguments:
-h, --help show this help message and exit
Expand Down
2 changes: 1 addition & 1 deletion genipe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__license__ = "CC BY-NC 4.0"
__maintainer__ = "Louis-Philippe Lemieux Perreault"
__email__ = "[email protected]"
__status__ = "Development"
__status__ = "Production"


chromosomes = range(1, 23)
Expand Down
Loading

0 comments on commit dc1f408

Please sign in to comment.