view evaluate_population_numbers.bash @ 39:e56023008e36 default tip

Changed revision of package_fisher_0_1_4 to be2fc454d121 Changed revision of package_matplotlib_1_2 to a03ee94316b5
author miller-lab
date Mon, 06 Jul 2015 10:32:24 -0400
parents 8ae67e9fb6ff
children
line wrap: on
line source

#!/usr/bin/env bash

if [ $# -ne 3 ]; then
    echo "usage"
    exit 1
fi

input_ped_file="$1"
output_file="$2"
max_populations="$3"

ADMIXTURE=admixture

for (( i=1; $i <= $max_populations; i++ )); do
    $ADMIXTURE --cv "$input_ped_file" $i 2>&1 | grep CV | perl -ne 's/CV error/CVE/; print;' >> "$output_file"
done