PIVOT¶
The PIVOT command allows you to extract significant information from a large, detailed data set by taking row-based data and mapping it into horizontal columns. Pivoting in the GOR language is different from other languages because it assumes that you are pivoting genomic-ordered data and has performance advantages as a result of this.
Usage¶
gor ... | PIVOT pivotCol -v value1,value2,.. [ attributes ]
OPTIONS¶
|
Additional grouping columns (other than chr, pos) |
|
Character to denote empty field. Defaults to ?. |
|
The values are string without quotes and must be comma-separated. |
|
Values read from a file or a nested query |
|
Column prefixes read from a file or a nested query |
|
Assume rows are ordered by the grouping columns |
The pivot-aggregate is First, e.g. assuming single-valued data per pivot value per group. Use GROUP to define other aggregates for multi-valued/row data. Use SELECT to pick a subset of columns from the output.
The -ordered flag can reduce the memory usage significantly, especially when the number of pivot values is high. Note that there are no checks to see if the order is correct - only use this option if the input stream is correctly ordered.