-
Notifications
You must be signed in to change notification settings - Fork 23
split_bed
Martin Asser Hansen edited this page Oct 2, 2015
·
5 revisions
split_bed splits big BED entries into series of smaller ones, which may be practical for intersections to obtain higher resolution. The starting position of each window (0-based) is added to each Q_ID.
The original BED entry is not output.
... | split_bed [options]
[-? | --help] # Print full usage description.
[-w <uint> | --window_size=<uint>] # Window size - Default=20
[-s <uint> | --step_size=<uint>] # Step size - Default=1
[-I <file> | --stream_in=<file!>] # Read input from stream file - Default=STDIN
[-O <file> | --stream_out=<file>] # Write output to stream file - Default=STDOUT
[-v | --verbose] # Verbose output.
Consider the following BED entry in the file test.bed
chr1 10 100 name 12
To split the BED entry into a windows size of 30 and step size 10 first read the entry using read_bed, and write the resulting BED entries using write_bed:
read_bed -i test.bed | split_bed -w 30 -s 10 | write_bed -x
chr1 10 41 name_0 12
chr1 20 51 name_10 12
chr1 30 61 name_20 12
chr1 40 71 name_30 12
chr1 50 81 name_40 12
chr1 60 91 name_50 12
chr1 10 100 name 12
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2007
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
split_bed is part of the Biopieces framework.