From a7f8876fcbdb8d3a020c12b508bd5038422a5745 Mon Sep 17 00:00:00 2001
From: hjulienne <hanna.julienne@gmail.com>
Date: Thu, 22 Nov 2018 17:13:50 +0000
Subject: [PATCH] added requirements to the preprocessing

---
 .gitlab-ci.yml                                   |  1 +
 .../jass_preprocessing/map_reference.py          | 16 ++++++++++++++++
 .../jass_preprocessing/requirements.txt          |  6 ++++++
 3 files changed, 23 insertions(+)
 create mode 100644 jass_preprocessing/jass_preprocessing/requirements.txt

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1b7629..5235271 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,7 @@ pages:
     - yum install -y make
     - pip3 install sphinx
     - pip3 install sphinxcontrib-bibtex
+    - pip3 install -r jass_preprocessing/jass_preprocessing/requirements.txt
     - cd jass_preprocessing/doc
     - make html
     - mv _build/html/ ../../public
diff --git a/jass_preprocessing/jass_preprocessing/map_reference.py b/jass_preprocessing/jass_preprocessing/map_reference.py
index bb049bc..e04589f 100644
--- a/jass_preprocessing/jass_preprocessing/map_reference.py
+++ b/jass_preprocessing/jass_preprocessing/map_reference.py
@@ -1,3 +1,8 @@
+"""
+    Module of function
+
+
+"""
 import pandas as pd
 import numpy as np
 import jass_preprocessing.dna_utils as dna_u
@@ -19,6 +24,12 @@ def map_on_ref_panel(gw_df , ref_panel):
     Merge Gwas dataframe with the reference panel
     Make sure that the same SNPs are in the reference panel and the gwas
 
+    Args:
+        gw_df (pandas dataframe): GWAS study dataframe
+        ref_panel (pandas dataframe): reference panel dataframe
+
+    Return:
+        merge_GWAS (pandas dataframe): merge studies,
     """
     inter_index = ref_panel.index.intersection(gw_df.index)
 
@@ -46,6 +57,11 @@ def compute_is_flipped(mgwas):
     Check if the reference panel and the GWAS data have the same reference
     allele. return a boolean vector.
 
+    Args:
+        mgwas (pandas dataframe): GWAS study dataframe merged with the reference_panel
+    Return:
+        is_flipped (pandas dataframe): merge studies,
+
     """
     flipped = pd.DataFrame({"ref_flipped" : (mgwas.ref == mgwas.a2), "alt_flipped" : (mgwas.alt == mgwas.a1)})
     flipped_complement = pd.DataFrame({"ref_flippedc" : (mgwas.ref == mgwas.a2c), "alt_flippedc" : (mgwas.alt == mgwas.a1c)})
diff --git a/jass_preprocessing/jass_preprocessing/requirements.txt b/jass_preprocessing/jass_preprocessing/requirements.txt
new file mode 100644
index 0000000..ffed5c6
--- /dev/null
+++ b/jass_preprocessing/jass_preprocessing/requirements.txt
@@ -0,0 +1,6 @@
+scipy
+pandas
+numpy
+warnings
+seaborn
+matplotlib
-- 
GitLab