annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
1 #!/usr/bin/env bash
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
2
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
3 if [ $# -ne 3 ]; then
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
4 echo "usage"
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
5 exit 1
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
6 fi
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
7
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
8 input_ped_file="$1"
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
9 output_file="$2"
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
10 max_populations="$3"
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
11
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
12 ADMIXTURE=admixture
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
13
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
14 for (( i=1; $i <= $max_populations; i++ )); do
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
15 $ADMIXTURE --cv "$input_ped_file" $i 2>&1 | grep CV | perl -ne 's/CV error/CVE/; print;' >> "$output_file"
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
16 done
8ae67e9fb6ff Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
miller-lab
parents:
diff changeset
17