Category

Genomic Interval Manipulation


Usage

bedtools expand -i <bed> -c <cols>


Manual

This tool is part of the bedtools suite.

This tool expands concatenated feature values for each genome regions as defined in one or multiple columns. Note: the values have to be concatented by comma (,).

Required arguments

  • -c <string>: Specify the column (1-based) that should be summarized. Multiple columns should be separated by commas (,).

Options

  • -i <bed>: Input file. Assumes stdin if omitted.

Examples

$ cat test.txt
chr1    10    20    1,2,3    10,20,30
chr1    40    50    4,5,6    40,50,60
Expand on the fifth column
$ bedtools expand -i test.txt -c 5
chr1    10    20    1,2,3    10
chr1    10    20    1,2,3    20
chr1    10    20    1,2,3    30
chr1    40    50    4,5,6    40
chr1    40    50    4,5,6    50
chr1    40    50    4,5,6    60
Expand on both the fourth and fifth columns
$ bedtools expand -i test.txt -c 4,5
chr1    10    20    1    10
chr1    10    20    2    20
chr1    10    20    3    30
chr1    40    50    4    40
chr1    40    50    5    50
chr1    40    50    6    60

File formats this tool works with
BEDGFFGTFVCF

Share your experience or ask a question