예제 #1
0
def getTriglycerides(replaced_missing, replaced_branching, input_filename,
                     data_field1, date_time_var, directory_for_output):
    '''Function to generate QC ,statistics and phenotype specific data for the column 'triglycerides' in the input spreadsheet.
    The phenotype specific data is classified based on 1 condition'''

    desired_var = 'triglycerides'

    output_table_QC_tri = str(directory_for_output) + str(
        desired_var) + "_" + "QC-tables_" + str(
            input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_tri = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"
    output_value_phen_tri = str(directory_for_output) + str(
        desired_var) + "_" + "Phen-table_" + str(
            input_filename) + "_" + date_time_var + ".xls"

    writer_tri = pd.ExcelWriter(output_table_QC_tri)

    llq_tri = 0.13
    ulq_tri = 5.60
    con1_tri = 1.7

    stat_and_QC(llq_tri, ulq_tri, desired_var, data_field1,
                output_values_QC_tri, writer_tri, replaced_missing,
                replaced_branching)

    Phenotype_1conditions(con1_tri, desired_var, data_field1, writer_tri,
                          output_value_phen_tri)

    writer_tri.save()
예제 #2
0
def getHDL (replaced_missing,replaced_branching,input_filename,data_field1,date_time_var,directory_for_output):
    '''Function to generate QC ,statistics and phenotype specific data for the column 'hdl in the input spreadsheet.
    This phenotype data is sex specific and is classified in both casses into 2 classes.'''
    
    desired_var = 'hdl'
    
    
    output_table_QC_hdl = str(directory_for_output)  + str(desired_var) + "_" + "QC-tables_" + str(input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_hdl = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"
    output_value_phen_hdl = str(directory_for_output)  + str(desired_var) + "_" + "Phen-table_" + str(input_filename) + "_" + date_time_var + ".xls"
    
    writer_hdl = pd.ExcelWriter(output_table_QC_hdl)
    
    llq_hdl = 0.05
    ulq_hdl = 3.80
    con_m = 1.0
    con_f = 1.3
   
    
    
    stat_and_QC(llq_hdl, ulq_hdl ,desired_var ,data_field1 , output_values_QC_hdl , writer_hdl , 
                replaced_missing, replaced_branching  )
    
    Phenotype_1condition_sex_2func(  desired_var ,data_field1 ,writer_hdl, output_value_phen_hdl,con_m,con_f)
    

    
    writer_hdl.save()
예제 #3
0
def getGlucose(replaced_missing, replaced_branching, input_filename,
               data_field1, date_time_var, directory_for_output):
    '''Function to generate QC ,statistics and phenotype specific data for the column 'glucose'' in the input spreadsheet.
    The phenotype specific data is classified into 5 different classes'''

    desired_var = 'glucose'

    output_table_QC_glucose = str(directory_for_output) + str(
        desired_var) + "_" + "QC-tables_" + str(
            input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_glucose = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"
    output_value_phen_glucose = str(directory_for_output) + str(
        desired_var) + "_" + "Phen-table_" + str(
            input_filename) + "_" + date_time_var + ".xls"

    writer_glucose = pd.ExcelWriter(output_table_QC_glucose)

    llq_glucose = 0.36
    ulq_glucose = 35
    con1_glucose = 5.60
    con2_glucose = 7.00
    con3_glucose = 11.10

    stat_and_QC(llq_glucose, ulq_glucose, desired_var, data_field1,
                output_values_QC_glucose, writer_glucose, replaced_missing,
                replaced_branching)

    Phenotype_5conditions(llq_glucose, con1_glucose, con2_glucose,
                          con3_glucose, desired_var, data_field1,
                          writer_glucose, output_value_phen_glucose)

    writer_glucose.save()
예제 #4
0
def getTotCholesterol (replaced_missing,replaced_branching,input_filename,data_field1,date_time_var,directory_for_output):
    '''Function to generate QC ,statistics and phenotype specific data for the column 'cholesterol_1' in the input spreadsheet.
    The phenotype specific data is classified based on 1 condition'''
    
    desired_var = 'cholesterol_1'
    
    
    output_table_QC_tot_chol = str(directory_for_output)  + str(desired_var) + "_" + "QC-tables_" + str(input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_tot_chol = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"
    output_value_phen_tot_chol = str(directory_for_output)  + str(desired_var) + "_" + "Phen-table_" + str(input_filename) + "_" + date_time_var + ".xls"
    
    writer_tot_chol = pd.ExcelWriter(output_table_QC_tot_chol)
    
    llq_tot_chol = 0.30
    ulq_tot_chol = 17.20
    con1_tot_chol = 5.0
    
    
    
    stat_and_QC(llq_tot_chol, ulq_tot_chol ,desired_var ,data_field1 , output_values_QC_tot_chol , writer_tot_chol , 
                replaced_missing, replaced_branching  )
    
    Phenotype_1conditions( con1_tot_chol, desired_var ,data_field1 ,  writer_tot_chol ,
            output_value_phen_tot_chol)
    
    writer_tot_chol.save()
예제 #5
0
def getTotProtein_urine(replaced_missing, replaced_branching, input_filename,
                        data_field1, date_time_var, directory_for_output):
    '''Function to generate QC and statistics specific data for the column 'ur_protein' in the input spreadsheet.'''

    desired_var = 'ur_protein'

    output_table_QC_TotProtein = str(directory_for_output) + str(
        desired_var) + "_" + "QC-tables_" + str(
            input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_TotProtein = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"

    writer_TotProtein = pd.ExcelWriter(output_table_QC_TotProtein)

    llq_TotProtein = 40
    ulq_TotProtein = 2000

    stat_and_QC(llq_TotProtein, ulq_TotProtein, desired_var, data_field1,
                output_values_QC_TotProtein, writer_TotProtein,
                replaced_missing, replaced_branching)

    writer_TotProtein.save()
예제 #6
0
def getCreatinine_serum(replaced_missing, replaced_branching, input_filename,
                        data_field1, date_time_var, directory_for_output):
    '''Function to generate QC and statistics specific data for the column 's_creatinine' in the input spreadsheet.'''

    desired_var = 's_creatinine'

    output_table_QC_creatinine_s = str(directory_for_output) + str(
        desired_var) + "_" + "QC-tables_" + str(
            input_filename) + "_" + date_time_var + ".xls"
    output_values_QC_creatinine_s = directory_for_output + desired_var + "_" + "QC-values_" + input_filename + "_" + date_time_var + ".xls"

    writer_creatinine_s = pd.ExcelWriter(output_table_QC_creatinine_s)

    llq_creatinine_s = 11.80
    ulq_creatinine_s = 2448

    stat_and_QC(llq_creatinine_s, ulq_creatinine_s, desired_var, data_field1,
                output_values_QC_creatinine_s, writer_creatinine_s,
                replaced_missing, replaced_branching)

    writer_creatinine_s.save()