View source: R/pathWAS_snpCheck.R
pathWAS_snpCheck | R Documentation |
Takes in MR input created by pathWAS_MR and checks which (if any) SNPs are deemed invalid by the MendelianRandomization package,
pathWAS_snpCheck(mr_input_check, verbose = TRUE)
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.