This code enables users to get PICS credible sets for nearly any index SNP with a pvalue. Users can then test if two genetic signals colocalize in a Bayesian framework.
library("piccolo")
gwas_credSet <- pics.download(rsid="rs123", pvalue=-log10(1.23E-45))
eQTL_credSet <- pics.read("/full/path/to/pics.txt")
myColoc <- pics.coloc(gwas_credSet, eQTL_credSet)
See the pinned issue for a pptx showing further illustrating an example. Also available here
Test for colocalization of two PICS credible sets
myColoc <- pics.coloc(gwas_credSet, eQTL_credSet)
|Options | Value | Default | ----------- | ---------------------------------------------------------- | ------------------ | |data1, data2 | PICS sets from pics.read or pics.download | NA |pics1, pics2 | column name to pull PICS prob from. | "PICS_probability" |rsid1, rsid2 | column name to pull rsid from. | "Linked_SNP" |rounded | [#] Decimal points to round posteriors to. | |priorc1 | Prior probability for a siganl in data1 | 1e-4 |priorc2 | Prior probability for a siganl in data2 | 1e-4 |priorc12 | Prior probability for colocalization of both signals. | 1e-5
Test for colocalization of two PICS credible sets
myColoc <- pics.coloc.lite(gwas_credSet, eQTL_credSet)
Query the PICs website and get a PICs credible set for a SNP of interest
myCredSet <- pics.download(rsid="rs6795744", pvalue = "1.23e-20")
|Options | Value | Default | --------- | ------------------------------------------------ | ----------------------------------- | |rsid | SNP rsID | Example: "rs1234" |pvalue | pvalue or -log10(pvalue). | Examples: -log10(1.23E-45) or 45 |ancestry | [EUR, ASN, AFR] | "EUR" |output | Full path and name for the download to be saved. | held in memory
options(RCurlOptions = list(proxy="proxy.URL:PORT", proxyuserpwd="ID:PW"))
Load a PICs file that was either download from the website (copy+paste to a text file) or a saved output from pics.download(output=X)
myCredSet <- pics.read("/full/path/to/PICs_credSet.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.