|
1 | 1 | #!/bin/bash -x |
2 | 2 | SMC=$(which smc++) |
| 3 | +TMP=$(mktemp -d) |
3 | 4 | set -e |
4 | | -$SMC vcf2smc -v example/example.vcf.gz /tmp/example.1.smc.gz 1 msp1:msp_0 |
5 | | -$SMC vcf2smc -d msp_0 msp_0 example/example.vcf.gz /tmp/example.2.smc.gz 1 msp2:msp_0,msp_3,msp_4 |
6 | | -$SMC vcf2smc -d msp_1 msp_1 example/example.vcf.gz /tmp/example.12.smc.gz 1 msp1:msp_1,msp_2 msp2:msp_3,msp_4,msp_0 |
7 | | -$SMC estimate -o /tmp/out/1 --unfold --knots 5 --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz |
8 | | -$SMC estimate -o /tmp/out/1 --unfold --knots 5 --timepoints 33,1000 --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz |
9 | | -$SMC estimate -p 0.01 -r 1e-8 -o /tmp/out/2 --knots 5 --em-iterations 1 1.25e-8 /tmp/example.2.smc.gz |
10 | | -$SMC split -o /tmp/out/split --em-iterations 1 \ |
11 | | - /tmp/out/1/model.final.json \ |
12 | | - /tmp/out/2/model.final.json \ |
13 | | - /tmp/example.*.smc.gz |
14 | | -$SMC split --polarization-error .02 -o /tmp/out/split --em-iterations 1 \ |
15 | | - /tmp/out/1/model.final.json \ |
16 | | - /tmp/out/2/model.final.json \ |
17 | | - /tmp/example.*.smc.gz |
18 | | -$SMC posterior /tmp/out/1/model.final.json \ |
19 | | - /tmp/matrix.npz /tmp/example.1.smc.gz /tmp/example.1.smc.gz |
| 5 | +$SMC vcf2smc -v example/example.vcf.gz $TMP/example.1.smc.gz 1 msp1:msp_0 |
| 6 | +$SMC vcf2smc -v example/example.vcf.gz $TMP/example.11.smc.gz 1 msp1:msp_1 |
| 7 | +$SMC vcf2smc -d msp_0 msp_0 example/example.vcf.gz $TMP/example.2.smc.gz 1 msp2:msp_0,msp_3,msp_4 |
| 8 | +$SMC vcf2smc -d msp_1 msp_1 example/example.vcf.gz $TMP/example.12.smc.gz 1 msp1:msp_1,msp_2 msp2:msp_3,msp_4,msp_0 |
| 9 | +$SMC chunk 10 200000 $TMP/chunk.1. $TMP/example.1.smc.gz |
| 10 | +$SMC chunk 10 200000 $TMP/chunk.2. $TMP/example.2.smc.gz |
| 11 | +$SMC chunk 10 200000 $TMP/chunk.12. $TMP/example.12.smc.gz |
| 12 | +$SMC estimate --em-iterations 1 -o $TMP/out/1 --unfold --knots 5 --em-iterations 1 1.25e-8 $TMP/example.1.smc.gz |
| 13 | +$SMC estimate --em-iterations 1 -o $TMP/out/1 --unfold --knots 5 --timepoints 33 1000 --em-iterations 1 1.25e-8 $TMP/example.1.smc.gz |
| 14 | +$SMC estimate --em-iterations 1 -p 0.01 -r 1e-8 -o $TMP/out/2 --knots 5 --em-iterations 1 1.25e-8 $TMP/example.2.smc.gz |
| 15 | +$SMC cv --em-iterations 1 --folds 2 -o $TMP/out/cv --fold 0 1e-8 $TMP/example.1.smc.gz $TMP/example.11.smc.gz |
| 16 | +$SMC cv --em-iterations 1 --folds 2 -o $TMP/out/cv --fold 1 1e-8 $TMP/example.1.smc.gz $TMP/example.11.smc.gz |
| 17 | +$SMC cv --em-iterations 1 --folds 2 -o $TMP/out/cv 1e-8 $TMP/example.1.smc.gz $TMP/example.11.smc.gz |
| 18 | +$SMC cv --em-iterations 1 --folds 2 -o $TMP/out/cv1 1e-8 $TMP/example.1.smc.gz $TMP/example.11.smc.gz |
| 19 | +$SMC split -o $TMP/out/split --em-iterations 1 \ |
| 20 | + $TMP/out/1/model.final.json \ |
| 21 | + $TMP/out/2/model.final.json \ |
| 22 | + $TMP/example.*.smc.gz |
| 23 | +$SMC split -o $TMP/out/split --em-iterations 1 \ |
| 24 | + $TMP/out/1/model.final.json \ |
| 25 | + $TMP/out/2/model.final.json \ |
| 26 | + $TMP/chunk* |
| 27 | +$SMC split --polarization-error .02 -o $TMP/out/split --em-iterations 1 \ |
| 28 | + $TMP/out/1/model.final.json \ |
| 29 | + $TMP/out/2/model.final.json \ |
| 30 | + $TMP/example.*.smc.gz |
| 31 | +$SMC posterior $TMP/out/1/model.final.json \ |
| 32 | + $TMP/matrix.npz $TMP/example.1.smc.gz $TMP/example.1.smc.gz |
| 33 | +$SMC simulate $TMP/out/1/model.final.json 2 .01 $TMP/out/1/sim.vcf |
| 34 | +$SMC simulate $TMP/out/split/model.final.json 2 .01 $TMP/out/split/sim.vcf |
20 | 35 | $SMC posterior --colorbar -v \ |
21 | | - --heatmap /tmp/plot.png \ |
22 | | - /tmp/out/1/model.final.json \ |
23 | | - /tmp/matrix.npz /tmp/example.1.smc.gz |
| 36 | + --heatmap $TMP/plot.png \ |
| 37 | + $TMP/out/1/model.final.json \ |
| 38 | + $TMP/matrix.npz $TMP/example.1.smc.gz |
24 | 39 | $SMC posterior -v \ |
25 | | - /tmp/out/split/model.final.json \ |
26 | | - /tmp/matrix.npz \ |
27 | | - /tmp/example.12.smc.gz |
28 | | -$SMC plot -c -g 29 /tmp/1.png /tmp/out/1/model.final.json |
29 | | -$SMC plot /tmp/2.pdf /tmp/out/2/model.final.json |
30 | | -$SMC plot -c /tmp/12.png /tmp/out/split/model.final.json |
31 | | -$SMC plot -c /tmp/all.pdf /tmp/out/*/model.final.json |
| 40 | + $TMP/out/split/model.final.json \ |
| 41 | + $TMP/matrix.npz \ |
| 42 | + $TMP/example.12.smc.gz |
| 43 | +$SMC plot -c -g 29 $TMP/1.png $TMP/out/1/model.final.json |
| 44 | +$SMC plot $TMP/2.pdf $TMP/out/2/model.final.json |
| 45 | +$SMC plot -c $TMP/12.png $TMP/out/split/model.final.json |
| 46 | +$SMC plot -c $TMP/all.pdf $TMP/out/*/model.final.json |
| 47 | + |
0 commit comments