Skip to content

Extract Outliers

sai provides the outlier command to identify candidate regions from the output of the score command.

To see available options, we can run:

sai outlier -h

This will show information for each argument:

Argument Description
-h, --help show this help message and exit
--score Path to the input score file.
--output Path to save the output file.
--quantile Quantile threshold for outlier detection, between 0 and 1. Default: 0.99.

Input files

The input file is the output generated by the score command.

Output files

The output file has the same format as that of the score command.

Examples

To extract outliers from the output of the previous score example, we can use the following command:

sai outlier --score examples/results/1KG.nea_den.chr9.example.both.U50.scores.tsv \
            --output examples/results/1KG.nea_den.chr9.example.both.U50.outliers.tsv \
            --quantile 0.99

This identifies candidate introgressed regions from both Neanderthals and Denisovans by selecting windows with U statistic values above the 0.99 quantile in the score command output. The result can be found here.