calculate_VE: Calculate Variance Explained for Significant SNPs

Description Usage Arguments Details Value

View source: R/process_mappings.R

Description

calculate_VE calculates the variance explained (VE) for significant SNPs by using the the spearman rank correlation coefficient.

Usage

1
calculate_VE(mapping_df, phenotype_df)

Arguments

mapping_df

the output from the gwas_mappings function. User input

phenotype_df

two element list. element 1 : traits. element 2: trait values with strains in columns with each row corresponding to trait in element 1

Details

This function requires three inputs, two of which are provided by the user and the other is loaded by the package.

Value

Outputs a two element list that contains two dataframes. The first data frame is a processed mappings dataframe that contains the same columns as the output of gwas_mappings with two additional columns. One that contains the bonferroni corrected p-value (BF) and another that contains an identifier 1,0 if the indicated SNP has a higher -log10 value than the bonferroni cut off or not, respectively The second data frame contains the variance explained data as well as all of the information from the first element.


AndersenLab/cegwas documentation built on March 6, 2020, 1:10 a.m.