Category

Fetch Data


Usage

bedToExons originalBeds.bed splitBeds.bed


Manual

This tool is part of UCSC Genome Browser's utilities.

This tools works with genes/transcripts in bed 12 format where informations about exons are stored in the 10~12 columns. It splits exons for each gene/transcript to individual lines.

Required arguments

  • originalBeds.bed: Input bed file in bed 12 format with exons' information stored in the 10~12 columns.
    • The 10th column: The number of exons for a gene/transcript.
    • The 11th column: A comma-separated list of the exon sizes. The number of items in this list should correspond to the 10th columns.
    • The 12th column: A comma-separated list of exon starts. All of the start positions should be calculated relative to the start of the gene/transcript. The number of items in this list should correspond to the number of counts defined in the 10th column.
  • splitBeds.bed: Path to the output bed file

Options

  • -cdsOnly: Only output the coding portions of exons.

Example

Export exons from UCSC's Table Browser

bedToExons is a useful tool for users who want to export exons from UCSC's Table Browser. The web interface may time out and lead to incomplete lists of exon regions. In these cases, you can directly download the bed file for the Whole Gene, assume the file name is gencode_v43.bed (pass this as originalBeds.bed) and you want to save the exons in a file called gencode_v43.exons.bed (pass this as splitBeds.bed):

$ head gencode_v43.bed
chr1    12009    13670    ENST00000450305.2    0    +    12009    12009    0,0,0    6    48,49,85,78,154,218,    0,169,603,965,1211,1443,
chr1    11868    14409    ENST00000456328.2    0    +    11868    11868    0,0,0    3    359,109,1189,    0,744,1352,
chr1    17368    17436    ENST00000619216.1    0    -    17368    17368    0,0,0    1    68,    0,
chr1    14403    29570    ENST00000488147.1    0    -    14403    14403    0,0,0    11    98,34,152,159,198,136,137,147,99,154,37,    0,601,1392,2203,2454,2829,3202,3511,3864,10334,15130,
chr1    30365    30503    ENST00000607096.1    0    +    30365    30365    0,0,0    1    138,    0,
chr1    29553    31097    ENST00000473358.1    0    +    29553    29553    0,0,0    3    486,104,122,    0,1010,1422,
chr1    30266    31109    ENST00000469289.1    0    +    30266    30266    0,0,0    2    401,134,    0,709,
chr1    35244    36073    ENST00000461467.1    0    -    35244    35244    0,0,0    2    237,353,    0,476,
chr1    34553    36081    ENST00000417324.1    0    -    34553    34553    0,0,0    3    621,205,361,    0,723,1167,
chr1    52472    53312    ENST00000606857.1    0    +    52472    52472    0,0,0    1    840,    0,

$ bedToExons gencode_v43.bed gencode_v43.exons.bed

$ head gencode_v43.exons.bed
chr1    12009    12057    ENST00000450305.2    0    +
chr1    12178    12227    ENST00000450305.2    0    +
chr1    12612    12697    ENST00000450305.2    0    +
chr1    12974    13052    ENST00000450305.2    0    +
chr1    13220    13374    ENST00000450305.2    0    +
chr1    13452    13670    ENST00000450305.2    0    +
chr1    11868    12227    ENST00000456328.2    0    +
chr1    12612    12721    ENST00000456328.2    0    +
chr1    13220    14409    ENST00000456328.2    0    +
chr1    17368    17436    ENST00000619216.1    0    -

 


Share your experience or ask a question