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

added requirements to the preprocessing

parent ffc624ab
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
"""
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)})
......
scipy
pandas
numpy
warnings
seaborn
matplotlib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment