Parameter q corresponds to the command line option -q
in the QUBIC command line tool, and the rank option corresponds to
-r. For each gene, the algorithm applies quantile discretization first to
divide conditions into negative (lower), un-changed and positive (higher) expressions. Negative
and positive expressed conditions are considered as outliers. For
outliers in each direction, the algorithm tries to further quantileDiscretize
the expression values in case $rank>1$.
This second discretization step is performed by dividing the sorted
outliers into $rank$ tandom groups with equal conditions. A label
is assigned to each of these tandom groups, in the following order:
$$-1, -2, \ldots, -rank$$
for outliers with negative expression, from the most negative group to
the least negative group (not the other way around!).
Similarly, for positive outliers, labels in the order of
$$rank, rank-1, \ldots, 1$$
are assigned to tandom groups from the least positive group to
the most positive group.
That is, signs of labels indicate the direction of gene expression
change, and the absolute value represents the quantileDiscretized rank
in the outliers.