Пример #1
0
def get_casefeature_by_disease():
	data = request.get_json(force=True)
	print data
	disease = data.get('disease', None)
	tissue_type = data.get('tissue_type', None)
	site = data.get('site', None)
	gender = data.get('gender', None)
	metastatic = data.get('metastatic', None)
	egfr = data.get('egfr', None)
	idh1 = data.get('idh1', None)
	idh2 = data.get('idh2', None)
	tp53 = data.get('tp53', None)
	age = data.get('tp53', None)
	tumor_grade = data.get('tumor_grade', None)
	tumor_stage = data.get('tumor_stage', None)
	sites_list = get_sites(disease, tissue_type, gender, metastatic, egfr, idh1, idh2, tp53, age, tumor_grade, tumor_stage)
	metastatics_list = get_metastatics(disease, tissue_type, site, gender, egfr, idh1, idh2, tp53, age, tumor_grade, tumor_stage)
	grades_list = get_grades(disease, tissue_type, site, gender, metastatic, egfr, idh1, idh2, tp53, age, tumor_stage)
	stages_list = get_stages(disease, tissue_type, site, gender, metastatic, egfr, idh1, idh2, tp53, age, tumor_grade)
	tissue_types_list = get_tissue_types(disease, site, gender, metastatic, egfr, idh1, idh2, tp53, age, tumor_grade, tumor_stage)
	gender_list = get_gender(disease, tissue_type, site, metastatic, egfr, idh1, idh2, tp53, age, tumor_grade, tumor_stage)
	egfr_list = get_EGFR(disease, tissue_type, site, gender, metastatic, idh1, idh2, tp53, age, tumor_grade, tumor_stage)
	idh1_list = get_IDH1(disease, tissue_type, site, gender, metastatic, egfr, idh2, tp53, age, tumor_grade, tumor_stage)
	idh2_list = get_IDH2(disease, tissue_type, site, gender, metastatic, egfr, idh1, tp53, age, tumor_grade, tumor_stage)
	tp53_list = get_TP53(disease, tissue_type, site, gender, metastatic, egfr, idh1, idh2, age, tumor_grade, tumor_stage)
	outdata = dict(sites=sites_list, metastatics=metastatics_list, grades=grades_list, stages=stages_list, tissue_types=tissue_types_list, gender=gender_list, 
		egfr=egfr_list, idh1=idh1_list, idh2=idh2_list, tp53=tp53_list)
	return json.dumps(outdata)
Пример #2
0
def dashboard():
    job_type = request.args.get('rerun', False)
    job_id = request.args.get('job_id', '')
    if job_id and job_type == 'true':
        job = Job.query.filter(Job.id == job_id).first()
    else:
        job = None
    sites = get_sites()
    print "tedstt"
    metastatics = get_metastatics()
    grades = get_grades()
    stages = get_stages()
    print stages
    print "end"
    return render_template('dashboard/dashboard.html', features=FEATURES, sites=sites,
                           metastatics=metastatics, grades=grades, stages=stages, job=job)
Пример #3
0
def dashboard1():
    """
    Extra function which displays dashboard without plotly

    :return:
    """
    job_type = request.args.get('rerun', False)
    job_id = request.args.get('job_id', '')
    if job_id and job_type == 'true':
        job = Job.query.filter(Job.id == job_id).first()
    else:
        job = None
    sites = get_sites()
    metastatics = get_metastatics()
    grades = get_grades()
    stages = get_stages()
    return render_template('dashboard/dashboard1.html', features=FEATURES, sites=sites, metastatics=metastatics,
                           grades=grades, stages=stages, job=job)
Пример #4
0
def get_casefeature_by_disease():
    data = request.get_json(force=True)

    disease = data.get('disease', None)

    tissue_type = data.get('tissue_type', None)
    site = data.get('site', None)
    gender = data.get('gender', None)
    metastatic = data.get('metastatic', None)
    egfr = data.get('egfr', None)
    idh1 = data.get('idh1', None)
    idh2 = data.get('idh2', None)
    tp53 = data.get('tp53', None)
    age = data.get('tp53', None)
    tumor_grade = data.get('tumor_grade', None)
    tumor_stage = data.get('tumor_stage', None)
    empMutation = ""
    empGain = ""
    empLoss = ""
    mutation_list = data.get('mutation_list', empMutation)
    gain_list = data.get('gain_list', empGain)
    loss_list = data.get('loss_list', empLoss)
    sites_list = get_sites(disease, tissue_type, gender, metastatic, egfr,
                           idh1, idh2, tp53, age, tumor_grade, tumor_stage)
    metastatics_list = get_metastatics(disease, tissue_type, site, gender,
                                       egfr, idh1, idh2, tp53, age,
                                       tumor_grade, tumor_stage)
    grades_list = get_grades(disease, tissue_type, site, gender, metastatic,
                             egfr, idh1, idh2, tp53, age, tumor_stage)
    stages_list = get_stages(disease, tissue_type, site, gender, metastatic,
                             egfr, idh1, idh2, tp53, age, tumor_grade)
    tissue_types_list = get_tissue_types(disease, site, gender, metastatic,
                                         egfr, idh1, idh2, tp53, age,
                                         tumor_grade, tumor_stage)
    gender_list = get_gender(disease, tissue_type, site, metastatic, egfr,
                             idh1, idh2, tp53, age, tumor_grade, tumor_stage)
    egfr_list = get_EGFR(disease, tissue_type, site, gender, metastatic, idh1,
                         idh2, tp53, age, tumor_grade, tumor_stage)
    idh1_list = get_IDH1(disease, tissue_type, site, gender, metastatic, egfr,
                         idh2, tp53, age, tumor_grade, tumor_stage)
    idh2_list = get_IDH2(disease, tissue_type, site, gender, metastatic, egfr,
                         idh1, tp53, age, tumor_grade, tumor_stage)
    tp53_list = get_TP53(disease, tissue_type, site, gender, metastatic, egfr,
                         idh1, idh2, age, tumor_grade, tumor_stage)
    mutation_list_data = get_mutation_list(disease, tissue_type, site, gender,
                                           metastatic, egfr, idh1, idh2, age,
                                           tumor_grade, tumor_stage,
                                           mutation_list)
    gain_list_data = get_gain_list(disease, tissue_type, site, gender,
                                   metastatic, egfr, idh1, idh2, age,
                                   tumor_grade, tumor_stage, gain_list)
    loss_list_data = get_loss_list(disease, tissue_type, site, gender,
                                   metastatic, egfr, idh1, idh2, age,
                                   tumor_grade, tumor_stage, loss_list)
    outdata = dict(sites=sites_list,
                   metastatics=metastatics_list,
                   grades=grades_list,
                   stages=stages_list,
                   tissue_types=tissue_types_list,
                   gender=gender_list,
                   egfr=egfr_list,
                   idh1=idh1_list,
                   idh2=idh2_list,
                   tp53=tp53_list,
                   mutation_list=mutation_list_data,
                   gain_list=gain_list_data,
                   loss_list=loss_list_data)

    return json.dumps(outdata)