Certain analysis and graphs need cytoband information in R or else where. In this note, we will fetch cytoband info from UCSC (goldenpath) ftp server, parse it to get cytoband information for Chr1 to Chr Y, sorted naturally i.e (Chr1-9, Chr10-22, ChrX, Y) excluding chrM and other assemblies (for eg. chrUn, Alt)

Command:
wget -qO- "http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz"| gzip -d | sort -V  |egrep -v -E  -i 'random|alt|chrun*|m'  > hg38.cyto.

This command would download gzipped cytoband file for hg38, unzips the file, sorts the entries in human/natural sort, extracts those records that do not contain words "random, alt, chrun* and m (ignoring the case).  This would result in a file with cytoband file without chromosome M and other assemblies.