> For the complete documentation index, see [llms.txt](https://help.connected.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.connected.illumina.com/annotation/v3.27/data-sources/dbsnp.md).

# dbSNP

### Overview

dbSNP contains human single nucleotide variations, microsatellites, and small-scale insertions and deletions along with publication, population frequency, molecular consequence, and genomic and RefSeq mapping information for both common variations and clinical mutations.

{% hint style="info" %}
**Publication**

Sherry, S.T., Ward, M. and Sirotkin, K. (1999) dbSNP—Database for Single Nucleotide Polymorphisms and Other Classes of Minor Genetic Variation. *Genome Res.*, **9**, 677–679.
{% endhint %}

### VCF File

#### Example

```scss
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
1	10177	rs367896724	A	AC	.	.	RS=367896724;RSPOS=10177;dbSNPBuildID=138; \ 
      SSR=0;SAO=0;VP=0x050000020005130026000200;GENEINFO=DDX11L1:100287102;WGT=1; \
      VC=DIV;R5;ASP;G5A;G5;KGPhase3;CAF=0.5747,0.4253;COMMON=1; \
      TOPMED=0.76728147298674821,0.23271852701325178
```

#### Parsing

From the VCF file, we're mainly interested in the following:

* `rsID` from the `ID` field
* `CAF` from the `INFO` field

**Global allele extraction**

The global major and minor alleles are extracted based on the frequency of the alleles provided in the CAF field. The global minor allele frequency is the second highest value of the CAF comma delimited field (ignoring '.' values).

{% hint style="info" %}
**Tie Breaking: Global Major Allele**

If there are two candidates for global major and the reference allele is one of them, we prefer the reference allele.
{% endhint %}

{% hint style="info" %}
**Tie Breaking: Global Minor Allele**

If there are two candidates for global minor and the reference allele is one of them, we prefer the other allele. If the reference allele is not involved, they are chosen arbitrarily.
{% endhint %}

**Equal Allele Frequency Example (2 alleles)**

```scss
chr1	100	A	C	CAF=0.5,0.5
```

We will select A to be the global major allele and C to be the global minor allele.

**Equal Allele Frequency Example (3 alleles)**

```scss
chr1	100	A	C,T	CAF=0.33,0.33,0.33
```

We will select A to be the global major allele and either C or T is chosen (arbitrarily) to be the global minor allele.

**Equal Allele Frequency in Alternate Alleles**

```scss
chr1	100	A	C,T	CAF=0.2,0.4,0.4
```

We will select C or T to be arbitrarily assigned to be the global major or global minor allele.

**Equal Allele Frequency Between Reference & Alternate Allele**

```scss
chr1	100	A	C,T	CAF=0.2,0.2,0.6
```

We will select T to be the global major allele and C to be the global minor allele.

### Known Issues

{% hint style="warning" %}
**Known Issues**

If there are multiple entries with different CAF values for the same allele, we use the first CAF value.
{% endhint %}

### Download URL

<https://ftp.ncbi.nih.gov/snp/organisms/>

### JSON Output

```json
"dbsnp":[
   "rs1042821"
]
```

| Field |     Type     | Notes       |
| ----- | :----------: | ----------- |
| dbsnp | string array | dbSNP rsIDs |

### Building the supplementary files

You can generate dbSNP supplementary annotation files by yourself. Please refer to SAUtils section for more details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.connected.illumina.com/annotation/v3.27/data-sources/dbsnp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
