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-prefix Prefix of the output files.
--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/both/1KG.nea_den.chr9.example.both.stats.tsv \
            --output-prefix examples/results/both/1KG.nea_den.chr9.example.both.stats \ 
            --quantile 0.9

This will produce separate outlier files for each statistic (e.g., \(U\), \(Q\), \(D^+\)), containing candidate introgressed regions that exceed the 0.9 quantile threshold. Examples can be found here.