% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/biomart_queries.R
\name{biomart.SNP.rsID}
\alias{biomart.SNP.rsID}
\title{Fetches the rs SNP IDs given the chromosomal coordinates and alleles}
\usage{
biomart.SNP.rsID(
  chr,
  ps,
  allele0,
  allele1,
  mart,
  with.position = FALSE,
  with.alleles = FALSE
)
}
\arguments{
\item{chr}{chromosome number (1, 2, ...)}

\item{ps}{position (bp)}

\item{allele0}{alternate allele}

\item{allele1}{reference allele}

\item{mart}{BioMart database}

\item{with.position}{whether including chromosome name and start and end position (default: false)}

\item{with.alleles}{whether including variant alleles (default: false, if with.position==TRUE is forced to TRUE)}
}
\value{
reference SNP IDs, or reference SNP IDs plus genomic coordinates and alleles
}
\description{
Uses biomaRt function to fetch the rs SNP ID for the given 
chromosoma coordinates and alleles. If no SNP is found in that position with those alleles
NA is returned. It uses the given BioMart database.
}
\examples{
mybiomart <- biomart.fetch.SNP.grch37.mart()
biomart.SNP.rsID(7, 24966446, "C", "A", mybiomart)
biomart.SNP.rsID(17, 75020291, "A", "G", mybiomart)
biomart.SNP.rsID(7, 24966446, "C", "A", mybiomart, with.position=TRUE)
biomart.SNP.rsID(17, 75020291, "A", "G", mybiomart, with.alleles=TRUE)
biomart.SNP.rsID(5, 70119760, "A", "G", mybiomart, with.alleles=TRUE)
}
\author{
Alessia Visconti, Niccolo' Rossi
}
