The MOD function returns the remainder in integer division. The function takes two parameters, the numerator and denominator to be used in the division calculation.


MOD(number,number) : integer


The example query divides 10 by 3 and returns the remainder from the result, which is 1.

gorrow chr1,1,1 | CALC test mod(10,3)
chrom    bpStart bpStop test
chr1     1       1      1