bed12tobed6 — bedtools 2.31.0 documentation

# bed12tobed6

bed12ToBed6 is a convenience tool that converts BED features in BED12 (a.k.a. “blocked” BED features such as genes) to discrete BED6 features. For example, in the case of a gene with six exons, bed12ToBed6 would create six separate BED6 features (i.e., one for each exon).

## Usage and option summary

Usage:

    bed12ToBed6 [OPTIONS] -i <BED12>

Option | Description
--- | ---
-i | The BED12 file that should be split into discrete BED6 features. Use “stdin” when using piped input.

## Default behavior

Figure:

    head data/knownGene.hg18.chr21.bed | tail -n 3
    chr21 10079666  10120808   uc002yiv.1  0  -  10081686  1 0 1 2 0 6 0 8  0     4   528,91,101,215, 0,1930,39750,40927,
    chr21 10080031  10081687   uc002yiw.1  0  -  10080031  1 0 0 8 0 0 3 1  0     2   200,91,    0,1565,
    chr21 10081660  10120796   uc002yix.2  0  -  10081660  1 0 0 8 1 6 6 0  0     3   27,101,223,0,37756,38913,

    head data/knownGene.hg18.chr21.bed | tail -n 3 | bed12ToBed6 -i stdin
    chr21 10079666  10080194  uc002yiv.1 0  -
    chr21 10081596  10081687  uc002yiv.1 0  -
    chr21 10119416  10119517  uc002yiv.1 0  -
    chr21 10120593  10120808  uc002yiv.1 0  -
    chr21 10080031  10080231  uc002yiw.1 0  -
    chr21 10081596  10081687  uc002yiw.1 0  -
    chr21 10081660  10081687  uc002yix.2 0  -
    chr21 10119416  10119517  uc002yix.2 0  -
    chr21 10120573  10120796  uc002yix.2 0  -

comments powered by Disqus