UCSC "Get DNA" tool: 0-based or 1-based

27 views
Skip to first unread message

X L

unread,
Dec 22, 2025, 4:01:54 PM (7 days ago) Dec 22
to UCSC Genome Browser Public Support
Hi, All,

I was wondering if the UCSC "Get DNA" tool uses 0-based or 1-based coordinates. For example, for hg38 "chr1:961786-961812", the sequence returned is "GACCCTGTGCCTCCCTCACCTGCCTCT". However, when I run the BLAT tool, the match is "chr1:961785-961812". Does this mean that the "Get DNA" tool is 1-based, while the BLAT match (the same as BED format coordinates) are 0-based?

Thanks,
Xiao

Hiram Clawson

unread,
Dec 22, 2025, 8:01:49 PM (7 days ago) Dec 22
to X L, UCSC Genome Browser Public Support
Good Afternoon Xiao:

Can you clarify what you are you referring to as running 'the BLAT tool' ?

When you see coordinates displayed in the 'position' box of the genome
browser, the coordinates are 1-based. The first 100 bases of chr1 would be:
chr1:1-100

The 'blat tool' in the genome browser displays the same 1-based coordinates
when used and viewed in the genome browser. Your sequence
"GACCCTGTGCCTCCCTCACCTGCCTCT" when placed in the 'position' box will
perform the blat search on the sequence and produce the same coordinates when
seen in the browser: "chr1:961786-961812"

If you run the command line 'blat' tool function, the coordinates it outputs
will be 'bed' file coordinates which are 0-based, the answer from the 'blat'
command line will be: chr1:961785-961812

The position search box recognizes 'bed' format positions when you input
the position string: "chr1 961785 961812" interpreted as 'bed' file coordinates
it will show the position: "chr1:961786-961812" in the genome browser.

What you are noticing is the difference between browser display
coordinates: 1-based, and the output of the 'blat' command 'bed' file
coordinates: 0-based.

--Hiram

Hiram Clawson

unread,
Dec 23, 2025, 2:25:49 PM (6 days ago) Dec 23
to X L, UCSC Genome Browser Public Support
The IGV browser is using the blat service at UCSC. That blat service
returns 'bed' file 0-based coordinates: "chr1 961785 961812"
Use the 'Click on a row to go to the alignment' the IGV system
will go to 'browser' 1-based coordinates: "chr1:961786-961812"

It is very typical for programming processing to use 0-based coordinates
to simplify the coordinate arithmetic. It is only in the browser
when coordinates are displayed to the user are the more human understanding
1-based coordinate system is used.

Anytime you use programs to process files and coordinates, expect the 0-based
coordinate system to be in use. When you view results in the browser,
they will be 1-based coordinates in the display.

On 12/23/25 7:37 AM, X L wrote:
> Hi, Hiram,
>
> Thank you very much. I ran "BLAT" from the IGV browser, I pasted the sequence
> "GACCCTGTGCCTCCCTCACCTGCCTCT" and IGV matched the sequence to the coordinate
>  "chr1:961785-961812" (screenshot attached). Based on your reply, does this
> mean IGV uses the command line "blat" tool, so the coordinates it outputs are in
> "bed" file format (0-based)?
>
> Regards,
>
> Xiao
>
> Screenshot 2025-12-23 at 10.33.10 AM.png

X L

unread,
2:45 PM (3 hours ago) 2:45 PM
to UCSC Genome Browser Public Support, Hiram Clawson
Hi, Hiram,

Thank you very much. I ran "BLAT" from the IGV browser, I pasted the sequence "GACCCTGTGCCTCCCTCACCTGCCTCT" and IGV matched the sequence to the coordinate  "chr1:961785-961812" (screenshot attached). Based on your reply, does this mean IGV uses the command line "blat" tool, so the coordinates it outputs are in "bed" file format (0-based)?

Regards,

Xiao

Screenshot 2025-12-23 at 10.33.10 AM.png

On Monday, December 22, 2025 at 8:01:49 PM UTC-5 Hiram Clawson wrote:

X L

unread,
2:46 PM (3 hours ago) 2:46 PM
to Hiram Clawson, UCSC Genome Browser Public Support
I see. Thank you very much!
Reply all
Reply to author
Forward
0 new messages