reconcile_data: Combine and reconcile the three main data components needed...

Description Usage Arguments Value Examples

View source: R/helpers_reconcile_data.R

Description

Helper function used at the begining of a ME app that takes the raw format of the three data sets required, phewas results, individual snp copies, and individual phenotype pairs, and combines them into a list object that combines individual data and checks phewas results along with extracting the snp name from the column of the genotype file.

Usage

1
2
3
4
5
6
reconcile_data(
  phewas_results,
  id_to_snp,
  id_to_code,
  multiple_comparisons_adjustment
)

Arguments

phewas_results

Dataframe containing the results of the phewas study. Needs columns p_val, id, category(along with accompanying color), tooltip.

id_to_snp

Dataframe containing columns on id, snp(# copies of allele).

id_to_code

Dataframe containing column id, and columns for each code included.

multiple_comparisons_adjustment

What type of multiple comparisons adjustment should be done to the phewas results? Options include "None", "Bonferroni", and "Benjamini-Hochberg". Note that the correction is performed before filtering of codes to those contained in individual data. Aka for as many tests as were passed in raw phewas results. If different behavior is desired, the user must provide results pre-adjusted.

Value

List with snp_name, individual_data, and phewas_results properties for use in ME app.

Examples

1
reconcile_data(phewas_table, id_to_snp, phenotype_id_pairs)

tbilab/meToolkit documentation built on June 23, 2020, 9:55 a.m.