-
Notifications
You must be signed in to change notification settings - Fork 23
merge_vals
Martin Asser Hansen edited this page Oct 2, 2015
·
6 revisions
merge_vals merges the values of a list of keys using a delimiter and saves the new value as value of the first key.
... | merge_vals [options]
[-? | --help] # Print full usage description.
[-k <list> | --keys=<list>] # List of values to merge.
[-d <string> | --delimit=<string>] # Merge delimiter - Default='_'
[-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 record:
STRAND: +
Q_ID: test
CHR_END: 24515
SCORE: 78
CHR_BEG: 24477
BED_LEN: 39
REC_TYPE: BED
CHR: chr4
BED_COLS: 6
---
To merge the values so that the Q_ID is joined with CHR, CHR_BEG and CHR_END, do:
... | merge_vals -k Q_ID,CHR,CHR_BEG,CHR_END
STRAND: +
CHR_END: 24515
Q_ID: test_chr4_24477_24515
CHR_BEG: 24477
SCORE: 78
REC_TYPE: BED
BED_LEN: 39
BED_COLS: 6
CHR: chr4
---
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2007
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
merge_vals is part of the Biopieces framework.