Skip to content
Snippets Groups Projects
Commit c8808e38 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

first take on parsing available phenotypes from the input file

parent 2a738d12
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,16 @@ from swagger_server.models.phenotype import Phenotype
from datetime import date, datetime
from typing import List, Dict
from six import iteritems
import pandas
from ..util import deserialize_date, deserialize_datetime
INIT_FILE_PATH = '/home/hmenager/jass/data/initTable.hdf5' #FIXME part of the config
PHENOLIST_DF = pandas.read_hdf(INIT_FILE_PATH,'PhenoList')
PHENOTYPES = []
for index, row in PHENOLIST_DF.iterrows():
phenotype = Phenotype(id=row['ID'], cohort=row['Cohort'], phenotype=row['Phenotype'], ref=row['Reference'])
PHENOTYPES.append(phenotype)
def phenotypes_get():
"""
......@@ -13,10 +21,7 @@ def phenotypes_get():
:rtype: List[Phenotype]
"""
phenotypes = []
phenotypes.append(Phenotype(id="z_GIANT_BMI", cohort="GIANT", phenotype="BMI", ref="10.1038/ng.686"))
phenotypes.append(Phenotype(id="z_GIANT_HEIGHT", cohort="GIANT", phenotype="BMI", ref="10.1038/ng.3097"))
return phenotypes
return PHENOTYPES
def projects_get():
......
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