Skip to content
Snippets Groups Projects
Commit 23fa59e2 authored by hjulienne's avatar hjulienne
Browse files

reconfigure repo file tree

parent c4876301
No related branches found
No related tags found
No related merge requests found
Pipeline #7837 failed
Showing
with 18 additions and 429 deletions
......@@ -6,13 +6,13 @@
map_gwas
dna_utils
map_reference
compute
compute_score
save_output
"""
import jass_preprocessing.map_gwas as map_gwas
import jass_preprocessing.dna_utils as dna_utils
import jass_preprocessing.map_reference as map_reference
import jass_preprocessing.compute as compute_score
import jass_preprocessing.save_output as save_output
import jass_preprocessing.map_gwas
import jass_preprocessing.dna_utils
import jass_preprocessing.map_reference
import jass_preprocessing.compute_score
import jass_preprocessing.save_output
File added
File added
File added
File added
File added
File added
File added
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = jass_preprocessing
SOURCEDIR = source
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
jass\_preprocessing.compute\_score package
==========================================
Module contents
---------------
.. automodule:: jass_preprocessing.compute_score
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.dna\_utils package
======================================
Module contents
---------------
.. automodule:: jass_preprocessing.dna_utils
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.map\_gwas package
=====================================
Submodules
----------
jass\_preprocessing.map\_gwas.map\_gwas module
----------------------------------------------
.. automodule:: jass_preprocessing.map_gwas.map_gwas
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: jass_preprocessing.map_gwas
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.map\_reference package
==========================================
Module contents
---------------
.. automodule:: jass_preprocessing.map_reference
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing package
===========================
Subpackages
-----------
.. toctree::
jass_preprocessing.compute_score
jass_preprocessing.dna_utils
jass_preprocessing.map_gwas
jass_preprocessing.map_reference
jass_preprocessing.save_output
Submodules
----------
jass\_preprocessing.compute module
----------------------------------
.. automodule:: jass_preprocessing.compute
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.dna\_utils module
-------------------------------------
.. automodule:: jass_preprocessing.dna_utils
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.map\_gwas module
------------------------------------
.. automodule:: jass_preprocessing.map_gwas
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.map\_reference module
-----------------------------------------
.. automodule:: jass_preprocessing.map_reference
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: jass_preprocessing
:members:
:undoc-members:
:show-inheritance:
jass\_preprocessing.save\_output package
========================================
Submodules
----------
jass\_preprocessing.save\_output.save\_output module
----------------------------------------------------
.. automodule:: jass_preprocessing.save_output.save_output
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: jass_preprocessing.save_output
:members:
:undoc-members:
:show-inheritance:
jass_preprocessing
==================
.. toctree::
:maxdepth: 4
jass_preprocessing
setup
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../../jass_preprocessing/'))
# -- Project information -----------------------------------------------------
project = 'jass_preprocessing'
copyright = '2018, Hanna Julienne'
author = 'Hanna Julienne'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '1.0'
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
'sphinx.ext.coverage'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'bizstyle'
# 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
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'jass_preprocessingdoc'
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'jass_preprocessing.tex',
'jass\\_preprocessing Documentation',
'Hanna Julienne', 'manual'),
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'jass_preprocessing', 'jass_preprocessing Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'jass_preprocessing', 'jass_preprocessing Documentation',
author, 'jass_preprocessing', 'One line description of project.',
'Miscellaneous'),
]
# -- Extension configuration -------------------------------------------------
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
.. jass_preprocessing documentation master file, created by
sphinx-quickstart on Wed Nov 7 11:03:55 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to jass_preprocessing's documentation!
==============================================
.. toctree::
:maxdepth: 2
:caption: Contents:
What is jass preprocessing ?
============================
Jass preprocessing is a tool package that take in input
heterogeneous GWAS summary statistics and perform standardization and quality
checks to output standardize summary statistic files that can be used as input
in the JASS python package and the RAISS imputation package.
The QC and preprocessing step goes as follow:
* map column from of a specific GWAS to standardize names
* Select GWAS SNPs that are in the input reference panel
* Align coded allele of the GWAS with the reference panel
* Save the output by chromosome as the following example:
+----------+-------+------+-----+--------+
| rsID | pos | A0 | A1 | Z |
+==========+=======+======+=====+========+
| rs6548219| 30762 | A | G | -1.133 |
+----------+-------+------+-----+--------+
Installation
============
In a folder that will contain the jass_preprocessing repository,
execute the following lines:
.. code-block:: shell
git clone https://gitlab.pasteur.fr/statistical-genetics/JASS_Pre-processing.git
cd JASS_Pre-processing/
pip3 install ./jass_preprocessing/
Preprocessing example
=====================
The file : "/JASS_Pre-processing/main_preprocessing.py" gives a complete example on
how to use this package.
Input
======
* A reference panel (1000 genome format). The user is expected to provide a reference panel in tsv format with the following columns in that order, without header:
+-----+-----+------------+-----+-----+---------+
| chr | pos | snp_id | ref | alt | MAF |
+=====+=====+============+=====+=====+=========+
| 1 |13116| rs62635286 | T | G |0.0970447|
+-----+-----+------------+-----+-----+---------+
| 1 |13118| rs200579949| A | G |0.0970447|
+-----+-----+------------+-----+-----+---------+
| 1 |14604| rs541940975| A | G | 0.147564|
+-----+-----+------------+-----+-----+---------+
| 1 |14930| rs75454623 | A | G | 0.482228|
+-----+-----+------------+-----+-----+---------+
* Folder containing all raw gwas data (all chromosomes in one file)
* a list containing the name of GWAS file to the string format.
* A descriptor csv files that will described each GWAS summary statistic files:
* a header
* 1 line per study
* the fields are:
+-------------------------------------------+------------------------------------------------------------+
| category | field name |
+===========================================+============================================================+
| path to the data | filename |
+-------------------------------------------+------------------------------------------------------------+
| study info fields | consortia,outcome,fullName,type,Nsample,Ncase,Ncontrol,Nsnp|
+-------------------------------------------+------------------------------------------------------------+
| names of the header in the GWAS file | snpid,a1,a2,freq,pval,n,z,OR,se,code,imp,ncas,ncont |
+-------------------------------------------+------------------------------------------------------------+
.. | I don't know | altNcas,altNcont|
* it must contain the following columns:
Hard coded path (l.20-29 of JASS_Pre-processing/main_preprocessing.py)
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment