% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query_GWAS_Catalog.R
\name{GWAS.catalog.SNP.proxy}
\alias{GWAS.catalog.SNP.proxy}
\title{Fetches associations in the GWAS Catalog involving the gived all proxy SNP}
\usage{
GWAS.catalog.SNP.proxy(
  rs,
  r2 = c("r2", "d"),
  pop = "GBR",
  LDlinktoken,
  min.r2 = 0.01,
  max.distance = 5e+05
)
}
\arguments{
\item{rs}{reference SNP IDs for the variant}

\item{r2}{whether use r2 or D' (use "r2" and "d", respectively)}

\item{pop}{population (multiple populations should be formatted as pop1\%2pop2\%2pop3)}

\item{LDlinktoken}{personal token (request via \url{https://ldlink.nci.nih.gov/?tab=apiaccess})}

\item{min.r2}{minum LD (r2) to return}

\item{max.distance}{maximun distance (in bp) to return}
}
\value{
a data frame listing the associations recorded in the GWAS catalog
}
\description{
Uses LDproxy Programmatic Access via API (\url{https://ldlink.nci.nih.gov/?tab=ldproxy}),
to extract the proxy SNPs, and then uses GWAS Catalog Access via API 
(\url{https://www.ebi.ac.uk/gwas/rest/docs/api}) to fetch the GWAS associations.
According to the LDLink CoC, this script should be run sequentially.
If no associations is found, NULL is returned.
}
\examples{
GWAS.catalog.SNP.proxy("rs7681615", "r2", "GBR", "n0tw0rk1ng", 0.8, 500000)
GWAS.catalog.SNP.proxy("rs4693052", "r2", "GBR", "n0tw0rk1ng", 0.8, 500000)
}
\seealso{
LDproxy

GWAS.catalog.SNP
}
\author{
Alessia Visconti
}
