Question: How to download all the CpG islands data of hg38 or hg19 in ucsc?
5
gravatar for winjorchen
2.5 years ago by
winjorchen50
winjorchen50 wrote:

Hi friends: How can i download all the CpG islands data of hg38 or hg19 in ucsc? Are there have a CpG island database? thx

ADD COMMENTlink modified 2.5 years ago by Alex Reynolds28k • written 2.5 years ago by winjorchen50
8
gravatar for Alex Reynolds
2.5 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

For hg19, you can grab the cpgIslandExt table from UCSC's goldenpath service, and use BEDOPS sort-bed to build a sorted BED4+ file:

$ wget -qO- http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/cpgIslandExt.txt.gz \
   | gunzip -c \
   | awk 'BEGIN{ OFS="\t"; }{ print $2, $3, $4, $5$6, substr($0, index($0, $7)); }' \
   | sort-bed - \
   > cpgIslandExt.hg19.bed

Derived from the table schema for this file, the first four columns are the island's genomic interval and name. The remaining columns are island length, number of CpGs in the island, the number of C and G in the island, the percentage of island that is CpG, the percentage of island that is C or G, and the ratio of observed(cpgNum) to expected(numC*numG/length) CpG in island.

You can do the same thing for hg38, with a slight tweak to the URL:

$ wget -qO- http://hgdownload.cse.ucsc.edu/goldenpath/hg38/database/cpgIslandExt.txt.gz \
   | gunzip -c \
   | awk 'BEGIN{ OFS="\t"; }{ print $2, $3, $4, $5$6, substr($0, index($0, $7)); }' \
   | sort-bed - \
   > cpgIslandExt.hg38.bed

The schema is the same between builds, but you can take a look at it here.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Alex Reynolds28k

thanks´╝îit is helpful!

ADD REPLYlink written 2.5 years ago by winjorchen50
2
gravatar for EagleEye
2.5 years ago by
EagleEye6.4k
Sweden
EagleEye6.4k wrote:

You can use table browser.

ADD COMMENTlink written 2.5 years ago by EagleEye6.4k

thanks! it is a easy way to get it, i never find this way befor!

ADD REPLYlink written 2.5 years ago by winjorchen50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 547 users visited in the last hour