ATMIN¶
The ATMIN command allows you to select a single row based on a minimum value of a defined column. Note that the column is treated as a number by default, to do a string comparison use the -s
option.
Using ATMIN in a nor query will give an error if binsize
input parameter is used.
Options¶
|
Returns the last value for multiple possible minimums. |
|
Grouping columns (other than bin). |
|
Assume the grouping columns are ordered. |
|
Treats the test column as a string and performs a string comparison. |
Use binsize = chrom
to aggregate for a whole chromosome and binsize = genome
to aggregate for the entire genome. Note, that the column must be a numeric column.
When using ATMIN in a NOR context, the ordered flag can both speed up the operation and reduce the memory usage significantly. Note that there are no checks to see if the order is correct - only use this option if the input stream is correctly ordered.
Examples¶
gor ... | ATMIN 1000 gene_start
Returns a row with the minimum gene_start value over 1000 base pairs.
gor ... | ATMIN chrom value_column -last -gc date
Returns a row with the minimum value_column value per chromosome. Group rows by the date column, each group is represented with a single row. If multiple minimums exist take the last one found.