-
Notifications
You must be signed in to change notification settings - Fork 0
Filtration String Usage and Examples
Matthew Mosior edited this page Sep 15, 2020
·
39 revisions
This wiki page serves to help users of bvf better understand filtration strings and ways to compose useful unix pipelines using bvf.
Filtration strings are the language that bvf uses to filter .tsv files.
A single filtration string is made up of four discrete components:
;COLUMNOFFILTRATION:STRUCTURE~OPERATION~COMPARISON;
- Column of Filtration: The column that bvf filters on.
- Structure: The structure of the data within the column that bvf filters on.
- Operation: The operation to perform on the data within the column that bvf filters on.
- Comparison: The comparison to perform on the operation-transformed data within the column that bvf filters on.
The following structures are supported by bvf:
- x,y: This structure should be used for two-piece data (i.e. 32,54)
- x: This structure should be used for one-piece data (2.241)
The following operators are supported by bvf:
- + : Addition
- - : Subtraction
- | : Null (do nothing)
The following operators are supported by bvf:
- >= : Greater than or equal to
- <= : Less than or equal to
- == : Equality
The following examples will help guide users through more complex filtration situations.
Example 1: Simple cat -> This example shows the default behavior of the program.
File | Input | Output |
---|---|---|
![]() |
$ ./bvf inputfile.tsv |
![]() |
Example 2: Filter on Two-Piece Field -> This example shows how to filter on a Two-Piece Field.