Mercurial > repos > miller-lab > genome_diversity
diff evaluate_population_numbers.bash @ 14:8ae67e9fb6ff
Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
author | miller-lab |
---|---|
date | Fri, 28 Sep 2012 11:35:56 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/evaluate_population_numbers.bash Fri Sep 28 11:35:56 2012 -0400 @@ -0,0 +1,17 @@ +#!/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 +