How to download the most similar annotation file as the author required from UCSC browser directly.
- Go to UCSC brower and Tool, Table caterogy. and pick you reference genome and select right version under clade/genome/assembly
- Make sure the group is "Genes and Gene Predictions"
- Choose your preferred track (RefSeq/RefGene or UCSC gene/KnownGene)
- Choose the table that gives gene information (RefSeq or KnownGene)
- Select your region or the entire genome to get coordinates for
- Select BED format as your output format
- Name your output file
- Click "get output"
Be careful, the ouput files don't have exon, intron, integenic, 5-UTR, 3-UTR informatics if you save it as a single file. You can save them as separated files so that you know the information for each subset.
Hopefully, I have complete the transformation process, you can download the file which I created: hg19_refGene.segment.bed
The format of the file is as the following which is more readable than the previous ones.
chr1 49090 65090 NM_001005484 OR4F5 + Enhancer 69090
chr1 65090 70090 NM_001005484 OR4F5 + Promoter 69090
chr1 69090 69090 NM_001005484 OR4F5 + UTR5 69090
chr1 69090 70008 NM_001005484 OR4F5 + Exon1 69090
chr1 70008 70008 NM_001005484 OR4F5 + UTR3 69090
chr1 70008 72008 NM_001005484 OR4F5 + Downstream 69090
chr1 347658 363658 NM_001005221 OR4F29 + Enhancer 367658
chr1 363658 368658 NM_001005221 OR4F29 + Promoter 367658
chr1 367658 367658 NM_001005221 OR4F29 + UTR5 367658
chr1 367658 368595 NM_001005221 OR4F29 + Exon1 367658
chr1 368595 368595 NM_001005221 OR4F29 + UTR3 367658
chr1 368595 370595 NM_001005221 OR4F29 + Downstream 367658
chr1 347658 363658 NM_001005224 OR4F3 + Enhancer 367658
chr1 363658 368658 NM_001005224 OR4F3 + Promoter 367658
chr1 367658 367658 NM_001005224 OR4F3 + UTR5 367658
chr1 367658 368595 NM_001005224 OR4F3 + Exon1 367658
chr1 368595 368595 NM_001005224 OR4F3 + UTR3 367658
chr1 368595 370595 NM_001005224 OR4F3 + Downstream 367658
chr1 347658 363658 NM_001005277 OR4F16 + Enhancer 367658
chr1 363658 368658 NM_001005277 OR4F16 + Promoter 367658
chr1 367658 367658 NM_001005277 OR4F16 + UTR5 367658
chr1 367658 368595 NM_001005277 OR4F16 + Exon1 367658
chr1 368595 368595 NM_001005277 OR4F16 + UTR3 367658
chr1 368595 370595 NM_001005277 OR4F16 + Downstream 367658
chr1 619097 621097 NM_001005221 OR4F29 - Downstream 622034
chr1 621097 621097 NM_001005221 OR4F29 - UTR3 622034
chr1 621097 622034 NM_001005221 OR4F29 - Exon1 622034
chr1 621034 626034 NM_001005221 OR4F29 - Promoter 622034
chr1 626034 642034 NM_001005221 OR4F29 - Enhancer 622034
JVARKIT mentioned by Pierre Lindenbaum is pretty cool. However the installation process of JVARKIT is complicated. Anyway, Now we can find that RSeQC and JVARKIT are suitable for such bioinformatic analysis. In addition, we can find that Python and Java have become the main source for bioinformatics research. It seems that Perl has been out of date.
obviously, gff2bed is the best choice to do it. this tools is C/C++ based. and can be download from the following website: https://github.com/bedops/bedops/releases
Thanks