根据CCDS数据库信息拿到全部外显子坐标

时间:2022-07-28
本文章向大家介绍根据CCDS数据库信息拿到全部外显子坐标,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

CCDS数据库团队居然在2018年又又又发表文章了,题目是:《Consensus coding sequence (CCDS) database: a standardized set of human and mouse protein-coding regions supported by expert curation》,链接在:https://academic.oup.com/nar/article/46/D1/D221/4595661

也就是说我三五年前写的很多教程需要更新了,那个时候使用的还是 CCDS.20161208.txt 这样的文件,在文章可以看到CCDS数据库的一些最新动态:

The CCDS data are available through an interactive web page (https://www.ncbi.nlm.nih.gov/CCDS/CcdsBrowse.cgi) and an FTP site (ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/).

对人类研究来说:

  • ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_human

文件是有点多,建议都下载看看不同文件里面的内容,对它们有一个系统性的认知,很多人生物信息学数据处理困难重重其实就是各式各样的基础知识不够扎实!

这仅仅是基础知识的一部分,如果想学习更多,建议看中国大学mooc的一些生物信息学相关课程,给大家做基础知识补充:

如果是这些课程都没有提到CCDS数据库,那么可能就是课程设置的问题啦。华盛顿大学8天的生物信息学培训也值得关注,现在网络资料都是公开获取的。

CCDS数据库对小鼠来说:

  • ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_mouse

如果我们想拿到全部的外显子坐标,这里我以小鼠为例子。首先下载文件 CCDS_exons.20191024.txt ,然后写脚本转为BED格式即可:

wget ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_mouse/CCDS.20191024.txt

grep -w Public CCDS.20191024.txt  |perl -alne '{/[(.*?)]/;next unless $1;$gene=$F[2];$exons=$1;$exons=~s/s//g;$exons=~s/-/t/g;print "$F[0]t$_t$gene" foreach split/,/,$exons;}'|sort -u |bedtools sort -i >mm10.exon

awk '{print "chr"$0"t0t+"}' mm10.exon >mm10.exon.chr.bed
awk '{print $1"t"$2-50"t"$3+50"t"$4"t"$5"t"$6}' mm10.exon.chr.bed > mm10.exon.chr.50bp.bed
awk '{print $0"t0t+"}' mm10.exon > mm10.exon.bed

文件信息节选如下:

$head $HOME/annotation/CCDS/mouse/mm10.exon.chr.50bp.bed
chr1 3215971 3217017 Xkr4 0 +
chr1 3421651 3421950 Xkr4 0 +
chr1 3670501 3671397 Xkr4 0 +
chr1 4292930 4293061 Rp1 0 +
chr1 4344549 4350140 Rp1 0 +
chr1 4351859 4352130 Rp1 0 +
chr1 4352151 4352886 Rp1 0 +
chr1 4352151 4352874 Rp1 0 +
chr1 4409119 4409236 Rp1 0 +
chr1 4491665 4492717 Sox17 0 + 
$tail $HOME/annotation/CCDS/mouse/mm10.exon.chr.50bp.bed
chrY 65401041 65401240 Gm20736 0 +
chrY 65403183 65403381 Gm20736 0 +
chrY 65403641 65403770 Gm20736 0 +
chrY 66739876 66740659 Gm20852 0 +
chrY 67045832 67046615 Ssty2 0 +
chrY 68539421 68540204 Gm20816 0 +
chrY 77960956 77961739 Gm20867 0 +
chrY 78835809 78836592 Gm20806 0 +
chrY 79148877 79149660 Gm20917 0 +
chrY 85528609 85529392 Gm20854 0 +

有些同学可能会问,为什么我要把外显子坐标前后延伸50bp呢?

另外还有同学会问,这样的全部外显子坐标在哪些场合用得上呢?

最后,可能还有同学会问,前面提到的ccds数据库的ftp网站全部文件有没有可能批量下载呢?