This is a test version of Biostars. For the public version, visit https://www.biostars.org.
genome coordinates hg19 from UCSC genome browser

Dear all, I need a chromosome's basepair start and basepair end points (genetic locations) or in other words genome coordinates (hg19) from the UCSC genome browser, can anyone help me? how can I find it?

Thanks

genome

Thank you @emilyprice, I couldn't see all start and endpoints. Is that link list all the points? Here is some part of the list from the link,

chr1 249250621

chr2 243199373

chr3 198022430

....

chr6_ssto_hap7 4928567

chr6_mcf_hap5 4833398

The start is 1 and the end is the number next to the chromosome name.

The start is actually zero; the convention is 0-based, half-open.

Thanks Alex. This is why I have problem with this:) :

The UCSC Genome Browser uses two different systems:

“1-start, fully-closed” = coordinates positioned within the web-based UCSC Genome Browser.

“0-start, half-open” = coordinates stored in database tables.

What UCSC visualizes in its browser uses a 1-based index, because most of us have ten digits on our hands and that makes counting of things more "natural" in a visual rendering.

What UCSC publishes as datasets are usually (not always, but generally) zero-based, half-open, which helps make distance calculations done via scripts or programs more "natural".

When you want to know how long something is, or how far away it is from something else, it is usually easier to subtract a pair of numbers, than it is to subtract and then add one base to correct the result.

2 answers

You can find them here: https://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.chrom.sizes

A good, generic way to do this is to get the fetchChromSizes tool from the UCSC Kent utilities kit:

$ fetchChromSizes hg19 | awk -v FS="\t" -v OFS="\t" '{ print $1, "0", $2; }' | sort-bed - > hg19.bed

You can use this for hg19, hg38, mm10, etc. Just swap out the assembly name.

Using BEDOPS sort-bed will give you a sorted, 0-indexed BED file ready for set operations.

Log in to answer this question.