-
Notifications
You must be signed in to change notification settings - Fork 23
write_bed
write_bed outputs BED (Browser Extensible Data) records from the stream. The BED format consists of up to 12 columns, where the first three are mandatory.
- CHR - the name of the chromosome.
- CHR_BEG - the chromosome begin position.
- CHR_END - the chromosome end position.
- Q_ID - the name of the feature.
- SCORE - a score between 0 and 1000.
- STRAND - the orientation of the feature.
- THICK_BEG - begin position of 'thick' drawing used for UTRs.
- THICK_END - end position of 'thick' drawing used for UTRs.
- ITEMRGB - RGB color code for feature.
- BLOCKCOUNT - number of exon blocks.
- BLOCKSIZES - list of block sizes.
- Q_BEGS - list of block begins.
Records can be written to BED format if the REC_TYPE is either:
- BED - from read_bed
- PSL - from read_psl
- PATSCAN - from patscan_seq
- BLAST - from read_blast_tab
- VMATCH - from vmatch_seq
... and if S_ID key begins with 'chr'.
Also, generic records may be output as BED format if the record contains CHR, CHR_BEG, and CHR_END keys and if the CHR value begins with 'chr'.
The number of columns output can be specified with the -c
switch.
For more about the BED format:
http://genome.ucsc.edu/FAQ/FAQformat#format1
... | write_bed [options]
[-? | --help] # Print full usage description.
[-c <uint> | --cols=<uint!>] # Number of columns to output.
[-C | --check] # Check integrety of BED entries.
[-x | --no_stream] # Do not emit records.
[-o <file> | --data_out=<file>] # Write result to file.
[-I <file!> | --stream_in=<file!>] # Read input from stream file - Default=STDIN
[-O <file> | --stream_out=<file>] # Write output to stream file - Default=STDOUT
[-Z | --compress] # Compress output using gzip.
[-v | --verbose] # Verbose output.
... | write_bed -xo test.bed
To write a 3 column BED file:
... | write_bed -c 3 -xo test.bed
To check the integrity of the BED entries use the -C
switch, which will raise
an error if the BED record is malformatted. This is useful if the Biopiece records
have been modified:
... | write_bed -xCo test.bed
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2007
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
write_bed is part of the Biopieces framework.