annotate evaluate_population_numbers.bash @ 1:0df7a9b89f13

add empty snifffers section to mitigate toolshed bug; new version of dpmix
author Richard Burhans <burhans@bx.psu.edu>
date Mon, 09 Apr 2012 12:40:57 -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