View source: R/pathWAS_MRInput.R
pathWAS_MRInput | R Documentation |
Inputs and combines aspects from your QTL SNPs, clumped SNPs, pathway genes, and omics summary stats (plus flip status) and creates MR input object.
pathWAS_MRInput(
genelist,
clumped_snps,
qtl_sumstats,
geneCol = "gene",
omics_snps,
omics_SNPCol = "rsid",
omics_BetaCol = "beta1",
omics_SECol = "se",
end_point = "endprotein",
verbose = TRUE
)
genelist |
list. List of genes extracted from database for your pathway which overlap with your QTL data. |
clumped_snps |
data frame. The data frame of clumped SNPs output from qtl_clumpR. |
qtl_sumstats |
character. File location for the QTLs used (either divided by gene or complete data). |
geneCol |
character. Name or number of column containing the name of the gene for each SNP in the QTL data. Default is "gene". Ensure the format of the name is the same as your gene list. |
omics_snps |
data frame. Summary stats of end-point omcis, now including FLIP column frm omics_MungeR |
omics_SNPCol |
character. Name/number of column containing the SNP ID in the omics data frame. |
omics_BetaCol |
character. Name/number of column containing the effect size in the omics data frame. |
omics_SECol |
character. Name/number of column containing the standard error in the omics data frame. |
This is a shortened version of the pathWAS_MR() function designed to solely output the same MR input object used in the mr_mvinput() function if PathWAS. Created primarily for use with the pathWAS_snpCheck function in mind.
## Having created a list of genes, clumped SNPs and munged your Omics SNPs you can input them in the following way, along with adding the option to save the MR output:
pathWAS_MR(genelist, clumped_snps, qtl_sumstats = "/opt/localdir/gene_qtls/file1_sumstats_$$$.tsv", geneCol = "gene_ensembl", omics_snps, save_MROutput = TRUE, save_MROutLoc = "/opt/localdir/mr_outputs/", path_select = "nod_signalling", end_point = "IL18")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.