The chromosome sizes can be retrieved with (to use for sanity check):
> ./faSize -veryDetailed -tab hs37d5.fa.gz
1 249250621 23970000 225280621 225280621 0
2 243199373 4994855 238204518 238204518 0
3 198022430 3225295 194797135 194797135 0
4 191154276 3492600 187661676 187661676 0
...
(first column is chromosome ID, second column is chromosome size).
Afterwards, the centromere coordinates are retrieved through (in this case I used hg19 since I'm working with hs37d5
):
> curl -s "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/cytoBand.txt.gz" \
| gunzip -c | grep acen | sed 's/chr//g' | sort -n > hg19.centromeres
The coordinates for each chromosome arm can be computed from the chromosome size and centromere coordinates.
N.B. As per UCSC documentation, cytoband's start is 0-based, while end is 1-based.
As a sanity check you might want to compare the end of the last cytoband for each chromosome, with the chromosome size (they should be the same, since end is 1-based).