annotate evaluate_population_numbers.bash @ 4:7a94f11fe71f

change output.extra_files_path to output.files_path
author Richard Burhans <burhans@bx.psu.edu>
date Tue, 10 Apr 2012 11:58:44 -0400
parents 2c498d40ecde
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
1 #!/usr/bin/env bash
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
2
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
3 if [ $# -ne 3 ]; then
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
4 echo "usage"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
5 exit 1
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
6 fi
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
7
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
8 input_ped_file="$1"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
9 output_file="$2"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
10 max_populations="$3"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
11
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
12 ADMIXTURE=admixture
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
13
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
14 for (( i=1; $i <= $max_populations; i++ )); do
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
15 $ADMIXTURE --cv "$input_ped_file" $i 2>&1 | grep CV >> "$output_file"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
16 done
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
17