pathWAS_snpCheck: Removes invalid SNPs from MR input

View source: R/pathWAS_snpCheck.R

pathWAS_snpCheckR Documentation

Removes invalid SNPs from MR input

Description

Takes in MR input created by pathWAS_MR and checks which (if any) SNPs are deemed invalid by the MendelianRandomization package,

Usage

pathWAS_snpCheck(mr_input_check, verbose = TRUE)

Arguments

mr_input

MRInput object. Object created by the MendelianRandomization::mr_mvinput() function

end_point

character. Name of end point protein (can be any string). Used for saving purposes if any save variable is set to TRUE.

path_select

character. Name of pathway (can be any string). Used for saving purposes if any save variable is set to TRUE.

Details

The MendelianRandomization::mr_mvlasso() function used in the PathWAS package produces an output with a table of exposures (genes) and estimates (weights/betas) based on SNPs input into the function. Occasionally, this output will have a different length of estimates and exposures due to removal of SNPs deemed as "invalid" by the function. This causes issues with downstream analyses as it means that some weights are missing from the output table, and thus cannot be used in creation of PRS. It also means that reading/extracting information from the table can cause errors in code. As the rationable behind what SNPs are deemed "invalid" is slightly arcane, this function is designed to use the MR input object used in mr_mvlasso() and find the SNPs which cause the erroneous output, so that the mr_mvlasso() function can be run without those SNPs in the first place.


Sabor117/PathWAS documentation built on Nov. 29, 2024, 7:44 a.m.