Sorting and reordering data
-sort option tells QCTOOL to sort variants in its output file:
The way this works is that QCTOOL first writes the data to a temporary file in the order that it is processed, keeping a record of the file locations of each variant in memory. It then copies each variant from the temporary file to the destination in the desired order.
The sort operation currently works for BGEN, unzipped GEN, and unzipped VCF output formats.
By default QCTOOL sorts based on on genomic position,
alleles, and ID fields. You can change this by specifying the
-compare-variants-by option, e.g.:
Possible fields that can be sorted on are:
rsid (which refers to the first or primary ID in the dataset),
snpid (which refers all but the first ID in each dataset).
-reorder option tells QCTOOL to reorder samples in its input. The format is:
<filename> is the name of a readable file containing sample identifiers.
This file must contain exactly N identifiers (if there are N samples being processed)
and each identifer must be the primary identifier of a sample being processed.
-reorder can take one of following the two special values:
-reorder backwards will reverse the order of samples, and
-reorder randomly will
randomly reorder samples.