Commit eab6512c authored by hjulienne's avatar hjulienne

add command line usage documentation

parent 00b4450b
Pipeline #7850 passed with stages
in 1 minute and 13 seconds
......@@ -13,7 +13,7 @@ pages:
- pip3 install sphinx
- yum install -y make
- pip3 install sphinx
- pip3 install sphinxcontrib-bibtex
- pip3 install sphinxcontrib-bibtex sphinx_rtd_theme sphinx-argparse
- pip3 install -r impute_jass/requirements.txt
- cd impute_jass/doc
- make html
......@@ -22,4 +22,4 @@ pages:
paths:
- public
only:
- master
\ No newline at end of file
- master
......@@ -46,7 +46,8 @@ extensions = [
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'sphinxcontrib.bibtex'
'sphinxcontrib.bibtex',
'sphinxarg.ext'
]
# Add any paths that contain templates here, relative to this directory.
......@@ -82,7 +83,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'bizstyle'
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......
......@@ -4,7 +4,7 @@
contain the root `toctree` directive.
Welcome to the Robust and Accurate Imputation from Summary Statistics (RAISS) documentation!
=====================================
============================================================================================
.. toctree::
:maxdepth: 2
......@@ -13,8 +13,8 @@ Welcome to the Robust and Accurate Imputation from Summary Statistics (RAISS) do
What is RAISS ?
===================
RAISS is python package to impute missing SNP summary statistics from
neighborring SNPs in linkage desiquilibrium.
RAISS is a python package to impute missing SNP summary statistics from
neighboring SNPs in linkage desiquilibrium.
The statistical model used to make the imputation is described in :cite:`Pasaniuc2014`
......@@ -35,15 +35,16 @@ Installation
Precomputation of LD-correlation
=================================
The imputation is based the Linkage desiquilibrium between SNPs.
The imputation is based the Linkage desiquilibrium
between SNPs.
To save computation the LD is computed and saved perform the imputation is
performed. To limit the number of SNP pairs, the LD is computed between pairs of
To save computation time, the LD is computed before imputation and saved as tabular format.
To limit the number of SNP pairs, the LD is computed between pairs of
SNPs in a approximately LD-independent regions. For an european ancestry, you can use
the region defined by :cite:`Berisa2015` that are provided in the package data folder.
To compute the LD you need to specify a reference panel splitted by chromosomes
(bed, fam and bim formats of plink, see `PLINK formats <https://www.cog-genomics.org/plink2/formats>` )
(bed, fam and bim formats of plink, see `PLINK formats <https://www.cog-genomics.org/plink2/formats>`_ )
.. code-block:: python
......@@ -59,7 +60,6 @@ To compute the LD you need to specify a reference panel splitted by chromosomes
Input format:
=============
GWAS results files must be provided in the tabular format by chromosome (tab separated)
all in the same folder with the following columns with the same header:
......@@ -69,13 +69,13 @@ all in the same folder with the following columns with the same header:
| rs6548219| 30762 | A | G | -1.133 |
+----------+-------+------+-----+--------+
This format can be obtain with the `JASS PreProcessing package <https://gitlab.pasteur.fr/statistical-genetics/JASS_Pre-processing>`.
This format can be obtained with the `JASS PreProcessing package <https://gitlab.pasteur.fr/statistical-genetics/JASS_Pre-processing>`.
Launching imputation on one chromosome
======================================
RAISS has an interface with the command line.
RAISS has an interface with the command line (see Command Line Usage bellow).
If you have access to a cluster, an efficient way to use RAISS is to launch
the imputation of each chromosome on a separate cluster node. The script
......@@ -88,6 +88,7 @@ Output
The raiss package outputs imputed GWAS files in the tabular format:
#TODO suppress complementary columns
+------------+---+--+----------------+-----+-----+----------------+------------------+---------+---------+
| |A0 |A1| Nsnp_to_impute |Var |Z |condition_number|correct_inversion |ld_score | pos |
+============+===+==+================+=====+=====+================+==================+=========+=========+
......@@ -96,18 +97,25 @@ The raiss package outputs imputed GWAS files in the tabular format:
# Keep only useful columns
Command Line Usage
==================
.. argparse::
:ref: impute_jass.__main__.add_chromosome_imputation_argument
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. automodule:: impute_jass
:members:
* :ref:`search`
.. autosummary::
:toctree: _autosummary
.. bibliography:: reference.bib
......@@ -32,7 +32,9 @@ def launch_chromosome_imputation(args):
imputed_zscore.to_csv(z_fo, sep='\t')
print("Save imputation done at {0}".format(z_fo))
def add_chromosome_imputation_argument(parser):
def add_chromosome_imputation_argument():
parser = argparse.ArgumentParser()
parser.add_argument('--chrom', required=True, help= "chromosome to impute to the chr\d+ format")
parser.add_argument('--gwas', required=True, help= "GWAS to impute to the consortia_trait format")
......@@ -50,7 +52,7 @@ def add_chromosome_imputation_argument(parser):
def main():
parser = argparse.ArgumentParser()#prog='impute_jass')
#prog='impute_jass')
parser = add_chromosome_imputation_argument(parser)
args = parser.parse_args()
args.func(args)
......
......@@ -9,6 +9,7 @@ setup(name='impute_jass',
license='MIT',
#package_dir = {'': 'jass_preprocessing'},
packages= ['impute_jass'],
package_data = {'impute_jass':'./data/*.csv'},
zip_safe=False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment