% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LDlink_query.R
\name{LDproxy}
\alias{LDproxy}
\title{Fetches all SNPs in LD with a given SNP}
\usage{
LDproxy(
  rs,
  r2 = c("r2", "d"),
  pop = "GBR",
  LDlinktoken,
  min.r2 = 0.01,
  max.distance = 5e+05
)
}
\arguments{
\item{rs}{reference SNP ID}

\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{
SNPs that are proxies for the given SNP. If no SNPs is identified a data frame populated by NA is returned instead
}
\description{
Uses LDproxy Programmatic Access via API (\url{https://ldlink.nci.nih.gov/?tab=ldproxy}).
LDproxy allows extracting all SNPs in LD with an r2 of at least min.r2 and at a maximun 
distance of max.distance. 
It processes one SNP at a time.
According to the LDLink CoC, this script should be run sequentially.
}
\examples{
LDproxy("rs123", "r2", "GBR", "n0tw0rk1ng", min.r2=0.8, max.distance=500000)
}
\author{
Alessia Visconti
}
