opticall avatar opticall committed ab76b4b

opticall version 0.5.5, adds X,Y,MT and multiple batch calling

Comments (0)

Files changed (5)

opticall/example.info

-sample1 0 0
-sample2 0 0
-sample3 0 0
-sample4 0 0
-sample5 0 0
-sample6 0 0
-sample7 0 0
-sample8 0 0
-sample9 0 0
-sample10 0 0
-sample11 0 0
-sample12 0 0
-sample13 0 0
-sample14 0 0
-sample15 0 0
-sample16 0 0
-sample17 0 0
-sample18 0 0
-sample19 0 0
-sample20 0 0
-sample21 0 0
-sample22 0 0
-sample23 0 0
-sample24 0 0
-sample25 0 0
-sample26 0 0
-sample27 0 0
-sample28 0 0
-sample29 0 0
-sample30 0 0
-sample31 0 0
-sample32 0 0
-sample33 0 0
-sample34 0 0
-sample35 0 0
-sample36 0 0
-sample37 0 0
-sample38 0 0
-sample39 0 0
-sample40 0 0
-sample41 0 0
-sample42 0 0
-sample43 0 0
-sample44 0 0
-sample45 0 0
-sample46 0 0
-sample47 0 0
-sample48 0 0
-sample49 0 0
-sample50 0 0
-sample51 0 0
-sample52 0 0
-sample53 0 0
-sample54 0 0
-sample55 0 0
-sample56 0 0
-sample57 0 0
-sample58 0 0
-sample59 0 0
-sample60 0 0
-sample61 0 0
-sample62 0 0
-sample63 0 0
-sample64 0 0
-sample65 0 0
-sample66 0 0
-sample67 0 0
-sample68 0 0
-sample69 0 0
-sample70 0 0
-sample71 0 0
-sample72 0 0
-sample73 0 0
-sample74 0 0
-sample75 0 0
-sample76 0 0
-sample77 0 0
-sample78 0 0
-sample79 0 0
-sample80 0 0
-sample81 0 0
-sample82 0 0
-sample83 0 0
-sample84 0 0
-sample85 0 0
-sample86 0 0
-sample87 0 0
-sample88 0 0
-sample89 0 0
-sample90 0 0
-sample91 0 0
-sample92 0 0
-sample93 0 0
-sample94 0 0
-sample95 0 0
-sample96 0 0
-sample97 0 0
-sample98 0 0
-sample99 0 0
-sample100 0 0
-sample101 0 0
-sample102 0 0
-sample103 0 0
-sample104 0 0
-sample105 0 0
-sample106 0 0
-sample107 0 0
-sample108 0 0
-sample109 0 0
-sample110 0 0
-sample111 0 0
-sample112 0 0
-sample113 0 0
-sample114 0 0
-sample115 0 0
-sample116 0 0
-sample117 0 0
-sample118 0 0
-sample119 0 0
-sample120 0 0
-sample121 0 0
-sample122 0 0
-sample123 0 0
-sample124 0 0
-sample125 0 0
-sample126 0 0
-sample127 0 0
-sample128 0 0
-sample129 0 0
-sample130 0 0
-sample131 0 0
-sample132 0 0
-sample133 0 0
-sample134 0 0
-sample135 0 0
-sample136 0 0
-sample137 0 0
-sample138 0 0
-sample139 0 0
-sample140 0 0
-sample141 0 0
-sample142 0 0
-sample143 0 0
-sample144 0 0
-sample145 0 0
-sample146 0 0
-sample147 0 0
-sample148 0 0
-sample149 0 0
-sample150 0 0
-sample151 0 0
-sample152 0 0
-sample153 0 0
-sample154 0 0
-sample155 0 0
-sample156 0 0
-sample157 0 0
-sample158 0 0
-sample159 0 0
-sample160 0 0
-sample161 0 0
-sample162 0 0
-sample163 0 0
-sample164 0 0
-sample165 0 0
-sample166 0 0
-sample167 0 0
-sample168 0 0
-sample169 0 0
-sample170 0 0
-sample171 0 0
-sample172 0 0
-sample173 0 0
-sample174 0 0
-sample175 0 0
-sample176 0 0
-sample177 0 0
-sample178 0 0
-sample179 0 0
-sample180 0 0
-sample181 0 0
-sample182 0 0
-sample183 0 0
-sample184 0 0
-sample185 0 0
-sample186 0 0
-sample187 0 0
-sample188 0 0
-sample189 0 0
-sample190 0 0
-sample191 0 0
-sample192 0 0
-sample193 0 0
-sample194 0 0
-sample195 0 0
-sample196 0 0
-sample197 0 0
-sample198 0 0
-sample199 0 0
-sample200 0 0
-sample201 0 0
-sample202 0 0
-sample203 0 0
-sample204 0 0
-sample205 0 0
-sample206 0 0
-sample207 0 0
-sample208 0 0
-sample209 0 0
-sample210 0 0
-sample211 0 0
-sample212 0 0
-sample213 0 0
-sample214 0 0
-sample215 0 0
-sample216 0 0
-sample217 0 0
-sample218 0 0
-sample219 0 0
-sample220 0 0
-sample221 0 0
-sample222 0 0
-sample223 0 0
-sample224 0 0
-sample225 0 0
-sample226 0 0
-sample227 0 0
-sample228 0 0
-sample229 0 0
-sample230 0 0
-sample231 0 0
-sample232 0 0
-sample233 0 0
-sample234 0 0
-sample235 0 0
-sample236 0 0
-sample237 0 0
-sample238 0 0
-sample239 0 0
-sample240 0 0
-sample241 0 0
-sample242 0 0
-sample243 0 0
-sample244 0 0
-sample245 0 0
-sample246 0 0
-sample247 0 0
-sample248 0 0
-sample249 0 0
-sample250 0 0
-sample251 0 0
-sample252 0 0
-sample253 0 0
-sample254 0 0
-sample255 0 0
-sample256 0 0
-sample257 0 0
-sample258 0 0
-sample259 0 0
-sample260 0 0
-sample261 0 0
-sample262 0 0
-sample263 0 0
-sample264 0 0
-sample265 0 0
-sample266 0 0
-sample267 0 0
-sample268 0 0
-sample269 0 0
-sample270 0 0
-sample271 0 0
-sample272 0 0
-sample273 0 0
-sample274 0 0
-sample275 0 0
-sample276 0 0
-sample277 0 0
-sample278 0 0
-sample279 0 0
-sample280 0 0
-sample281 0 0
-sample282 0 0
-sample283 0 0
-sample284 0 0
-sample285 0 0
-sample286 0 0
-sample287 0 0
-sample288 0 0
-sample289 0 0
-sample290 0 0
-sample291 0 0
-sample292 0 0
-sample293 0 0
-sample294 0 0
-sample295 0 0
-sample296 0 0
-sample297 0 0
-sample298 0 0
-sample299 0 0
-sample300 0 0
-sample301 0 1
-sample302 0 1
-sample303 0 1
-sample304 0 1
-sample305 0 1
-sample306 0 1
-sample307 0 1
-sample308 0 1
-sample309 0 1
-sample310 0 1
-sample311 0 1
-sample312 0 1
-sample313 0 1
-sample314 0 1
-sample315 0 1
-sample316 0 1
-sample317 0 1
-sample318 0 1
-sample319 0 1
-sample320 0 1
-sample321 0 1
-sample322 0 1
-sample323 0 1
-sample324 0 1
-sample325 0 1
-sample326 0 1
-sample327 0 1
-sample328 0 1
-sample329 0 1
-sample330 0 1
-sample331 0 1
-sample332 0 1
-sample333 0 1
-sample334 0 1
-sample335 0 1
-sample336 0 1
-sample337 0 1
-sample338 0 1
-sample339 0 1
-sample340 0 1
-sample341 0 1
-sample342 0 1
-sample343 0 1
-sample344 0 1
-sample345 0 1
-sample346 0 1
-sample347 0 1
-sample348 0 1
-sample349 0 1
-sample350 0 1
-sample351 0 1
-sample352 0 1
-sample353 0 1
-sample354 0 1
-sample355 0 1
-sample356 0 1
-sample357 0 1
-sample358 0 1
-sample359 0 1
-sample360 0 1
-sample361 0 1
-sample362 0 1
-sample363 0 1
-sample364 0 1
-sample365 0 1
-sample366 0 1
-sample367 0 1
-sample368 0 1
-sample369 0 1
-sample370 0 1
-sample371 0 1
-sample372 0 1
-sample373 0 1
-sample374 0 1
-sample375 0 1
-sample376 0 1
-sample377 0 1
-sample378 0 1
-sample379 0 1
-sample380 0 1
-sample381 0 1
-sample382 0 1
-sample383 0 1
-sample384 0 1
-sample385 0 1
-sample386 0 1
-sample387 0 1
-sample388 0 1
-sample389 0 1
-sample390 0 1
-sample391 0 1
-sample392 0 1
-sample393 0 1
-sample394 0 1
-sample395 0 1
-sample396 0 1
-sample397 0 1
-sample398 0 1
-sample399 0 1
-sample400 0 1
-sample401 0 1
-sample402 0 1
-sample403 0 1
-sample404 0 1
-sample405 0 1
-sample406 0 1
-sample407 0 1
-sample408 0 1
-sample409 0 1
-sample410 0 1
-sample411 0 1
-sample412 0 1
-sample413 0 1
-sample414 0 1
-sample415 0 1
-sample416 0 1
-sample417 0 1
-sample418 0 1
-sample419 0 1
-sample420 0 1
-sample421 0 1
-sample422 0 1
-sample423 0 1
-sample424 0 1
-sample425 0 1
-sample426 0 1
-sample427 0 1
-sample428 0 1
-sample429 0 1
-sample430 0 1
-sample431 0 1
-sample432 0 1
-sample433 0 1
-sample434 0 1
-sample435 0 1
-sample436 0 1
-sample437 0 1
-sample438 0 1
-sample439 0 1
-sample440 0 1
-sample441 0 1
-sample442 0 1
-sample443 0 1
-sample444 0 1
-sample445 0 1
-sample446 0 1
-sample447 0 1
-sample448 0 1
-sample449 0 1
-sample450 0 1
-sample451 0 1
-sample452 0 1
-sample453 0 1
-sample454 0 1
-sample455 0 1
-sample456 0 1
-sample457 0 1
-sample458 0 1
-sample459 0 1
-sample460 0 1
-sample461 0 1
-sample462 0 1
-sample463 0 1
-sample464 0 1
-sample465 0 1
-sample466 0 1
-sample467 0 1
-sample468 0 1
-sample469 0 1
-sample470 0 1
-sample471 0 1
-sample472 0 1
-sample473 0 1
-sample474 0 1
-sample475 0 1
-sample476 0 1
-sample477 0 1
-sample478 0 1
-sample479 0 1
-sample480 0 1
-sample481 0 1
-sample482 0 1
-sample483 0 1
-sample484 0 1
-sample485 0 1
-sample486 0 1
-sample487 0 1
-sample488 0 1
-sample489 0 1
-sample490 0 1
-sample491 0 1
-sample492 0 1
-sample493 0 1
-sample494 0 1
-sample495 0 1
-sample496 0 1
-sample497 0 1
-sample498 0 1
-sample499 0 1
-sample500 0 1
-sample501 0 1
-sample502 0 1
-sample503 0 1
-sample504 0 1
-sample505 0 1
-sample506 0 1
-sample507 0 1
-sample508 0 1
-sample509 0 1
-sample510 0 1
-sample511 0 1
-sample512 0 1
-sample513 0 1
-sample514 0 1
-sample515 0 1
-sample516 0 1
-sample517 0 1
-sample518 0 1
-sample519 0 1
-sample520 0 1
-sample521 0 1
-sample522 0 1
-sample523 0 1
-sample524 0 1
-sample525 0 1
-sample526 0 1
-sample527 0 1
-sample528 0 1
-sample529 0 1
-sample530 0 1
-sample531 0 1
-sample532 0 1
-sample533 0 1
-sample534 0 1
-sample535 0 1
-sample536 0 1
-sample537 0 1
-sample538 0 1
-sample539 0 1
-sample540 0 1
-sample541 0 1
-sample542 0 1
-sample543 0 1
-sample544 0 1
-sample545 0 1
-sample546 0 1
-sample547 0 1
-sample548 0 1
-sample549 0 1
-sample550 0 1
-sample551 0 1
-sample552 0 1
-sample553 0 1
-sample554 0 1
-sample555 0 1
-sample556 0 1
-sample557 0 1
-sample558 0 1
-sample559 0 1
-sample560 0 1
-sample561 0 1
-sample562 0 1
-sample563 0 1
-sample564 0 1
-sample565 0 1
-sample566 0 1
-sample567 0 1
-sample568 0 1
-sample569 0 1
-sample570 0 1
-sample571 0 1
-sample572 0 1
-sample573 0 1
-sample574 0 1
-sample575 0 1
-sample576 0 1
-sample577 0 1
-sample578 0 1
-sample579 0 1
-sample580 0 1
-sample581 0 1
-sample582 0 1
-sample583 0 1
-sample584 0 1
-sample585 0 1
-sample586 0 1
-sample587 0 1
-sample588 0 1
-sample589 0 1
-sample590 0 1
-sample591 0 1
-sample592 0 1
-sample593 0 1
-sample594 0 1
-sample595 0 1
-sample596 0 1
-sample597 0 1
-sample598 0 1
-sample599 0 1
-sample600 0 1
-sample601 0 1
-sample602 0 1
-sample603 0 1
-sample604 0 1
-sample605 0 1
-sample606 0 1
-sample607 0 1
-sample608 0 1
-sample609 0 1
-sample610 0 1
-sample611 0 1
-sample612 0 1
-sample613 0 1
-sample614 0 1
-sample615 0 1
-sample616 0 1
-sample617 0 1
-sample618 0 1
-sample619 0 1
-sample620 0 1
-sample621 0 1
-sample622 0 1
-sample623 0 1
-sample624 0 1
-sample625 0 1
-sample626 0 1
-sample627 0 1
-sample628 0 1
-sample629 0 1
-sample630 0 1
-sample631 0 1
-sample632 0 1
-sample633 0 1
-sample634 0 1
-sample635 0 1
-sample636 0 1
-sample637 0 1
-sample638 0 1
-sample639 0 1
-sample640 0 1
-sample641 0 1
-sample642 0 1
-sample643 0 1
-sample644 0 1
-sample645 0 1
-sample646 0 1
-sample647 0 1
-sample648 0 1
-sample649 0 1
-sample650 0 1
-sample651 0 1
-sample652 0 1
-sample653 0 1
-sample654 0 1
-sample655 0 1
-sample656 0 1
-sample657 0 1
-sample658 0 1
-sample659 0 1
-sample660 0 1
-sample661 0 1
-sample662 0 1
-sample663 0 1
-sample664 0 1
-sample665 0 1
-sample666 0 1
-sample667 0 1
-sample668 0 1
-sample669 0 1
-sample670 0 1
-sample671 0 1
-sample672 0 1
-sample673 0 1
-sample674 0 1
-sample675 0 1
-sample676 0 1
-sample677 0 1
-sample678 0 1
-sample679 0 1
-sample680 0 1
-sample681 0 1
-sample682 0 1
-sample683 0 1
-sample684 0 1
-sample685 0 1
-sample686 0 1
-sample687 0 1
-sample688 0 1
-sample689 0 1
-sample690 0 1
-sample691 0 1
-sample692 0 1
-sample693 0 1
-sample694 0 1
-sample695 0 1
-sample696 0 1
-sample697 0 1
-sample698 0 1
-sample699 0 1
-sample700 0 1
-sample701 0 1
-sample702 0 1
-sample703 0 1
-sample704 0 1
-sample705 0 1
-sample706 0 1
-sample707 0 1
-sample708 0 1
-sample709 0 1
-sample710 0 1
-sample711 0 1
-sample712 0 1
-sample713 0 1
-sample714 0 1
-sample715 0 1
-sample716 0 1
-sample717 0 1
-sample718 0 1
-sample719 0 1
-sample720 0 1
-sample721 0 1
-sample722 0 1
-sample723 0 1
-sample724 0 1
-sample725 0 1
-sample726 0 1
-sample727 0 1
-sample728 0 1
-sample729 0 1
-sample730 0 1
-sample731 0 1
-sample732 0 1
-sample733 0 1
-sample734 0 1
-sample735 0 1
-sample736 0 1
-sample737 0 1
-sample738 0 1
-sample739 0 1
-sample740 0 1
-sample741 0 1
-sample742 0 1
-sample743 0 1
-sample744 0 1
-sample745 0 1
-sample746 0 1
-sample747 0 1
-sample748 0 1
-sample749 0 1
-sample750 0 1
-sample751 0 1
-sample752 0 1
-sample753 0 1
-sample754 0 1
-sample755 0 1
-sample756 0 1
-sample757 0 1
-sample758 0 1
-sample759 0 1
-sample760 0 1
-sample761 0 1
-sample762 0 1
-sample763 0 1
-sample764 0 1
-sample765 0 1
-sample766 0 1
-sample767 0 1
-sample768 0 1
-sample769 0 1
-sample770 0 1
-sample771 0 1
-sample772 0 1
-sample773 0 1
-sample774 0 1
-sample775 0 1
-sample776 0 1
-sample777 0 1
-sample778 0 1
-sample779 0 1
-sample780 0 1
-sample781 0 1
-sample782 0 1
-sample783 0 1
-sample784 0 1
-sample785 0 1
-sample786 0 1
-sample787 0 1
-sample788 0 1
-sample789 0 1
-sample790 0 1
-sample791 0 1
-sample792 0 1
-sample793 0 1
-sample794 0 1
-sample795 0 1
-sample796 0 1
-sample797 0 1
-sample798 0 1
-sample799 0 1
-sample800 0 1
-sample801 0 1
-sample802 0 1
-sample803 0 1
-sample804 0 1
-sample805 0 1
-sample806 0 1
-sample807 0 1
-sample808 0 1
-sample809 0 1
-sample810 0 1
-sample811 0 1
-sample812 0 1
-sample813 0 1
-sample814 0 1
-sample815 0 1
-sample816 0 1
-sample817 0 1
-sample818 0 1
-sample819 0 1
-sample820 0 1
-sample821 0 1
-sample822 0 1
-sample823 0 1
-sample824 0 1
-sample825 0 1
-sample826 0 1
-sample827 0 1
-sample828 0 1
-sample829 0 1
-sample830 0 1
-sample831 0 1
-sample832 0 1
-sample833 0 1
-sample834 0 1
-sample835 0 1
-sample836 0 1
-sample837 0 1
-sample838 0 1
-sample839 0 1
-sample840 0 1
-sample841 0 1
-sample842 0 1
-sample843 0 1
-sample844 0 1
-sample845 0 1
-sample846 0 1
-sample847 0 1
-sample848 0 1
-sample849 0 1
-sample850 0 1
-sample851 0 1
-sample852 0 1
-sample853 0 1
-sample854 0 1
-sample855 0 1
-sample856 0 1
-sample857 0 1
-sample858 0 1
-sample859 0 1
-sample860 0 1
-sample861 0 1
-sample862 0 1
-sample863 0 1
-sample864 0 1
-sample865 0 1
-sample866 0 1
-sample867 0 1
-sample868 0 1
-sample869 0 1
-sample870 0 1
-sample871 0 1
-sample872 0 1
-sample873 0 1
-sample874 0 1
-sample875 0 1
-sample876 0 1
-sample877 0 1
-sample878 0 1
-sample879 0 1
-sample880 0 1
-sample881 0 1
-sample882 0 1
-sample883 0 1
-sample884 0 1
-sample885 0 1
-sample886 0 1
-sample887 0 1
-sample888 0 1
-sample889 0 1
-sample890 0 1
-sample891 0 1
-sample892 0 1
-sample893 0 1
-sample894 0 1
-sample895 0 1
-sample896 0 1
-sample897 0 1
-sample898 0 1
-sample899 0 1
-sample900 0 1
-sample901 0 1
-sample902 0 1
-sample903 0 1
-sample904 0 1
-sample905 0 1
-sample906 0 1
-sample907 0 1
-sample908 0 1
-sample909 0 1
-sample910 0 1
-sample911 0 1
-sample912 0 1
-sample913 0 1
-sample914 0 1
-sample915 0 1
-sample916 0 1
-sample917 0 1
-sample918 0 1
-sample919 0 1
-sample920 0 1
-sample921 0 1
-sample922 0 1
-sample923 0 1
-sample924 0 1
-sample925 0 1
-sample926 0 1
-sample927 0 1
-sample928 0 1
-sample929 0 1
-sample930 0 1
-sample931 0 1
-sample932 0 1
-sample933 0 1
-sample934 0 1
-sample935 0 1
-sample936 0 1
-sample937 0 1
-sample938 0 1
-sample939 0 1
-sample940 0 1
-sample941 0 1
-sample942 0 1
-sample943 0 1
-sample944 0 1
-sample945 0 1
-sample946 0 1
-sample947 0 1
-sample948 0 1
-sample949 0 1
-sample950 0 1
-sample951 0 1
-sample952 0 1
-sample953 0 1
-sample954 0 1
-sample955 0 1
-sample956 0 1
-sample957 0 1
-sample958 0 1
-sample959 0 1
-sample960 0 1
-sample961 0 1
-sample962 0 1
-sample963 0 1
-sample964 0 1
-sample965 0 1
-sample966 0 1
-sample967 0 1
-sample968 0 1
-sample969 0 1
-sample970 0 1
-sample971 0 1
-sample972 0 1
-sample973 0 1
-sample974 0 1
-sample975 0 1
-sample976 0 1
-sample977 0 1
-sample978 0 1
-sample979 0 1
-sample980 0 1
-sample981 0 1
-sample982 0 1
-sample983 0 1
-sample984 0 1
-sample985 0 1
-sample986 0 1
-sample987 0 1
-sample988 0 1
-sample989 0 1
-sample990 0 1
-sample991 0 1
-sample992 0 1
-sample993 0 1
-sample994 0 1
-sample995 0 1
-sample996 0 1
-sample997 0 1
-sample998 0 1
-sample999 0 1
-sample1000 0 1
+sample1 0 0 2
+sample2 0 0 2
+sample3 0 0 2
+sample4 0 0 2
+sample5 0 0 2
+sample6 0 0 2
+sample7 0 0 2
+sample8 0 0 2
+sample9 0 0 2
+sample10 0 0 2
+sample11 0 0 2
+sample12 0 0 2
+sample13 0 0 2
+sample14 0 0 2
+sample15 0 0 2
+sample16 0 0 2
+sample17 0 0 2
+sample18 0 0 2
+sample19 0 0 2
+sample20 0 0 2
+sample21 0 0 2
+sample22 0 0 2
+sample23 0 0 2
+sample24 0 0 2
+sample25 0 0 2
+sample26 0 0 2
+sample27 0 0 2
+sample28 0 0 2
+sample29 0 0 2
+sample30 0 0 2
+sample31 0 0 2
+sample32 0 0 2
+sample33 0 0 2
+sample34 0 0 2
+sample35 0 0 2
+sample36 0 0 2
+sample37 0 0 2
+sample38 0 0 2
+sample39 0 0 2
+sample40 0 0 2
+sample41 0 0 2
+sample42 0 0 2
+sample43 0 0 2
+sample44 0 0 2
+sample45 0 0 2
+sample46 0 0 2
+sample47 0 0 2
+sample48 0 0 2
+sample49 0 0 2
+sample50 0 0 2
+sample51 0 0 1
+sample52 0 0 1
+sample53 0 0 1
+sample54 0 0 1
+sample55 0 0 1
+sample56 0 0 1
+sample57 0 0 1
+sample58 0 0 1
+sample59 0 0 1
+sample60 0 0 1
+sample61 0 0 1
+sample62 0 0 1
+sample63 0 0 1
+sample64 0 0 1
+sample65 0 0 1
+sample66 0 0 1
+sample67 0 0 1
+sample68 0 0 1
+sample69 0 0 1
+sample70 0 0 1
+sample71 0 0 1
+sample72 0 0 1
+sample73 0 0 1
+sample74 0 0 1
+sample75 0 0 1
+sample76 0 0 1
+sample77 0 0 1
+sample78 0 0 1
+sample79 0 0 1
+sample80 0 0 1
+sample81 0 0 1
+sample82 0 0 1
+sample83 0 0 1
+sample84 0 0 1
+sample85 0 0 1
+sample86 0 0 1
+sample87 0 0 1
+sample88 0 0 1
+sample89 0 0 1
+sample90 0 0 1
+sample91 0 0 1
+sample92 0 0 1
+sample93 0 0 1
+sample94 0 0 1
+sample95 0 0 1
+sample96 0 0 1
+sample97 0 0 1
+sample98 0 0 1
+sample99 0 0 1
+sample100 0 0 1
+sample101 0 0 1
+sample102 0 0 1
+sample103 0 0 1
+sample104 0 0 1
+sample105 0 0 1
+sample106 0 0 1
+sample107 0 0 1
+sample108 0 0 1
+sample109 0 0 1
+sample110 0 0 1
+sample111 0 0 1
+sample112 0 0 1
+sample113 0 0 1
+sample114 0 0 1
+sample115 0 0 1
+sample116 0 0 1
+sample117 0 0 1
+sample118 0 0 1
+sample119 0 0 1
+sample120 0 0 1
+sample121 0 0 1
+sample122 0 0 1
+sample123 0 0 1
+sample124 0 0 1
+sample125 0 0 1
+sample126 0 0 1
+sample127 0 0 1
+sample128 0 0 1
+sample129 0 0 1
+sample130 0 0 1
+sample131 0 0 1
+sample132 0 0 1
+sample133 0 0 1
+sample134 0 0 1
+sample135 0 0 1
+sample136 0 0 1
+sample137 0 0 1
+sample138 0 0 1
+sample139 0 0 1
+sample140 0 0 1
+sample141 0 0 1
+sample142 0 0 1
+sample143 0 0 1
+sample144 0 0 1
+sample145 0 0 1
+sample146 0 0 1
+sample147 0 0 1
+sample148 0 0 1
+sample149 0 0 1
+sample150 0 0 1
+sample151 0 0 1
+sample152 0 0 1
+sample153 0 0 1
+sample154 0 0 1
+sample155 0 0 1
+sample156 0 0 1
+sample157 0 0 1
+sample158 0 0 1
+sample159 0 0 1
+sample160 0 0 1
+sample161 0 0 1
+sample162 0 0 1
+sample163 0 0 1
+sample164 0 0 1
+sample165 0 0 1
+sample166 0 0 1
+sample167 0 0 1
+sample168 0 0 1
+sample169 0 0 1
+sample170 0 0 1
+sample171 0 0 1
+sample172 0 0 1
+sample173 0 0 1
+sample174 0 0 1
+sample175 0 0 1
+sample176 0 0 1
+sample177 0 0 1
+sample178 0 0 1
+sample179 0 0 1
+sample180 0 0 1
+sample181 0 0 1
+sample182 0 0 1
+sample183 0 0 1
+sample184 0 0 1
+sample185 0 0 1
+sample186 0 0 1
+sample187 0 0 1
+sample188 0 0 1
+sample189 0 0 1
+sample190 0 0 1
+sample191 0 0 1
+sample192 0 0 1
+sample193 0 0 1
+sample194 0 0 1
+sample195 0 0 1
+sample196 0 0 1
+sample197 0 0 1
+sample198 0 0 1
+sample199 0 0 1
+sample200 0 0 1
+sample201 0 0 1
+sample202 0 0 1
+sample203 0 0 1
+sample204 0 0 1
+sample205 0 0 1
+sample206 0 0 1
+sample207 0 0 1
+sample208 0 0 1
+sample209 0 0 1
+sample210 0 0 1
+sample211 0 0 1
+sample212 0 0 1
+sample213 0 0 1
+sample214 0 0 1
+sample215 0 0 1
+sample216 0 0 1
+sample217 0 0 1
+sample218 0 0 1
+sample219 0 0 1
+sample220 0 0 1
+sample221 0 0 1
+sample222 0 0 1
+sample223 0 0 1
+sample224 0 0 1
+sample225 0 0 1
+sample226 0 0 1
+sample227 0 0 1
+sample228 0 0 1
+sample229 0 0 1
+sample230 0 0 1
+sample231 0 0 1
+sample232 0 0 1
+sample233 0 0 1
+sample234 0 0 1
+sample235 0 0 1
+sample236 0 0 1
+sample237 0 0 1
+sample238 0 0 1
+sample239 0 0 1
+sample240 0 0 1
+sample241 0 0 1
+sample242 0 0 1
+sample243 0 0 1
+sample244 0 0 1
+sample245 0 0 1
+sample246 0 0 1
+sample247 0 0 1
+sample248 0 0 1
+sample249 0 0 1
+sample250 0 0 1
+sample251 0 0 1
+sample252 0 0 1
+sample253 0 0 1
+sample254 0 0 1
+sample255 0 0 1
+sample256 0 0 1
+sample257 0 0 1
+sample258 0 0 1
+sample259 0 0 1
+sample260 0 0 1
+sample261 0 0 1
+sample262 0 0 1
+sample263 0 0 1
+sample264 0 0 1
+sample265 0 0 1
+sample266 0 0 1
+sample267 0 0 1
+sample268 0 0 1
+sample269 0 0 1
+sample270 0 0 1
+sample271 0 0 1
+sample272 0 0 1
+sample273 0 0 1
+sample274 0 0 1
+sample275 0 0 1
+sample276 0 0 1
+sample277 0 0 1
+sample278 0 0 1
+sample279 0 0 1
+sample280 0 0 1
+sample281 0 0 1
+sample282 0 0 1
+sample283 0 0 1
+sample284 0 0 1
+sample285 0 0 1
+sample286 0 0 1
+sample287 0 0 1
+sample288 0 0 1
+sample289 0 0 1
+sample290 0 0 1
+sample291 0 0 1
+sample292 0 0 1
+sample293 0 0 1
+sample294 0 0 1
+sample295 0 0 1
+sample296 0 0 1
+sample297 0 0 1
+sample298 0 0 1
+sample299 0 0 1
+sample300 0 0 1
+sample301 0 1 1
+sample302 0 1 1
+sample303 0 1 1
+sample304 0 1 1
+sample305 0 1 1
+sample306 0 1 1
+sample307 0 1 1
+sample308 0 1 1
+sample309 0 1 1
+sample310 0 1 1
+sample311 0 1 1
+sample312 0 1 1
+sample313 0 1 1
+sample314 0 1 1
+sample315 0 1 1
+sample316 0 1 1
+sample317 0 1 1
+sample318 0 1 1
+sample319 0 1 1
+sample320 0 1 1
+sample321 0 1 1
+sample322 0 1 1
+sample323 0 1 1
+sample324 0 1 1
+sample325 0 1 1
+sample326 0 1 1
+sample327 0 1 1
+sample328 0 1 1
+sample329 0 1 1
+sample330 0 1 1
+sample331 0 1 1
+sample332 0 1 1
+sample333 0 1 1
+sample334 0 1 1
+sample335 0 1 1
+sample336 0 1 1
+sample337 0 1 1
+sample338 0 1 1
+sample339 0 1 1
+sample340 0 1 1
+sample341 0 1 1
+sample342 0 1 1
+sample343 0 1 1
+sample344 0 1 1
+sample345 0 1 1
+sample346 0 1 1
+sample347 0 1 1
+sample348 0 1 1
+sample349 0 1 1
+sample350 0 1 1
+sample351 0 1 1
+sample352 0 1 1
+sample353 0 1 1
+sample354 0 1 1
+sample355 0 1 1
+sample356 0 1 1
+sample357 0 1 1
+sample358 0 1 1
+sample359 0 1 1
+sample360 0 1 1
+sample361 0 1 1
+sample362 0 1 1
+sample363 0 1 1
+sample364 0 1 1
+sample365 0 1 1
+sample366 0 1 1
+sample367 0 1 1
+sample368 0 1 1
+sample369 0 1 1
+sample370 0 1 1
+sample371 0 1 1
+sample372 0 1 1
+sample373 0 1 1
+sample374 0 1 1
+sample375 0 1 1
+sample376 0 1 1
+sample377 0 1 1
+sample378 0 1 1
+sample379 0 1 1
+sample380 0 1 1
+sample381 0 1 1
+sample382 0 1 1
+sample383 0 1 1
+sample384 0 1 1
+sample385 0 1 1
+sample386 0 1 1
+sample387 0 1 1
+sample388 0 1 1
+sample389 0 1 1
+sample390 0 1 1
+sample391 0 1 1
+sample392 0 1 1
+sample393 0 1 1
+sample394 0 1 1
+sample395 0 1 1
+sample396 0 1 1
+sample397 0 1 1
+sample398 0 1 1
+sample399 0 1 1
+sample400 0 1 1
+sample401 0 1 1
+sample402 0 1 1
+sample403 0 1 1
+sample404 0 1 1
+sample405 0 1 1
+sample406 0 1 1
+sample407 0 1 1
+sample408 0 1 1
+sample409 0 1 1
+sample410 0 1 1
+sample411 0 1 1
+sample412 0 1 1
+sample413 0 1 1
+sample414 0 1 1
+sample415 0 1 1
+sample416 0 1 1
+sample417 0 1 1
+sample418 0 1 1
+sample419 0 1 1
+sample420 0 1 1
+sample421 0 1 1
+sample422 0 1 1
+sample423 0 1 1
+sample424 0 1 1
+sample425 0 1 1
+sample426 0 1 1
+sample427 0 1 1
+sample428 0 1 1
+sample429 0 1 1
+sample430 0 1 1
+sample431 0 1 1
+sample432 0 1 1
+sample433 0 1 1
+sample434 0 1 1
+sample435 0 1 1
+sample436 0 1 1
+sample437 0 1 1
+sample438 0 1 1
+sample439 0 1 1
+sample440 0 1 1
+sample441 0 1 1
+sample442 0 1 1
+sample443 0 1 1
+sample444 0 1 1
+sample445 0 1 1
+sample446 0 1 1
+sample447 0 1 1
+sample448 0 1 1
+sample449 0 1 1
+sample450 0 1 1
+sample451 0 1 1
+sample452 0 1 1
+sample453 0 1 1
+sample454 0 1 1
+sample455 0 1 1
+sample456 0 1 1
+sample457 0 1 1
+sample458 0 1 1
+sample459 0 1 1
+sample460 0 1 1
+sample461 0 1 1
+sample462 0 1 1
+sample463 0 1 1
+sample464 0 1 1
+sample465 0 1 1
+sample466 0 1 1
+sample467 0 1 1
+sample468 0 1 1
+sample469 0 1 1
+sample470 0 1 1
+sample471 0 1 1
+sample472 0 1 1
+sample473 0 1 1
+sample474 0 1 1
+sample475 0 1 1
+sample476 0 1 1
+sample477 0 1 1
+sample478 0 1 1
+sample479 0 1 1
+sample480 0 1 1
+sample481 0 1 1
+sample482 0 1 1
+sample483 0 1 1
+sample484 0 1 1
+sample485 0 1 1
+sample486 0 1 1
+sample487 0 1 1
+sample488 0 1 1
+sample489 0 1 1
+sample490 0 1 1
+sample491 0 1 1
+sample492 0 1 1
+sample493 0 1 1
+sample494 0 1 1
+sample495 0 1 1
+sample496 0 1 1
+sample497 0 1 1
+sample498 0 1 1
+sample499 0 1 1
+sample500 0 1 1
+sample501 0 1 1
+sample502 0 1 1
+sample503 0 1 1
+sample504 0 1 1
+sample505 0 1 1
+sample506 0 1 1
+sample507 0 1 1
+sample508 0 1 1
+sample509 0 1 1
+sample510 0 1 1
+sample511 0 1 1
+sample512 0 1 1
+sample513 0 1 1
+sample514 0 1 1
+sample515 0 1 1
+sample516 0 1 1
+sample517 0 1 1
+sample518 0 1 1
+sample519 0 1 1
+sample520 0 1 1
+sample521 0 1 1
+sample522 0 1 1
+sample523 0 1 1
+sample524 0 1 1
+sample525 0 1 1
+sample526 0 1 1
+sample527 0 1 1
+sample528 0 1 1
+sample529 0 1 1
+sample530 0 1 1
+sample531 0 1 1
+sample532 0 1 1
+sample533 0 1 1
+sample534 0 1 1
+sample535 0 1 1
+sample536 0 1 1
+sample537 0 1 1
+sample538 0 1 1
+sample539 0 1 1
+sample540 0 1 1
+sample541 0 1 1
+sample542 0 1 1
+sample543 0 1 1
+sample544 0 1 1
+sample545 0 1 1
+sample546 0 1 1
+sample547 0 1 1
+sample548 0 1 1
+sample549 0 1 1
+sample550 0 1 1
+sample551 0 1 1
+sample552 0 1 1
+sample553 0 1 1
+sample554 0 1 1
+sample555 0 1 1
+sample556 0 1 1
+sample557 0 1 1
+sample558 0 1 1
+sample559 0 1 1
+sample560 0 1 1
+sample561 0 1 1
+sample562 0 1 1
+sample563 0 1 1
+sample564 0 1 1
+sample565 0 1 1
+sample566 0 1 1
+sample567 0 1 1
+sample568 0 1 1
+sample569 0 1 1
+sample570 0 1 1
+sample571 0 1 1
+sample572 0 1 1
+sample573 0 1 1
+sample574 0 1 1
+sample575 0 1 1
+sample576 0 1 1
+sample577 0 1 1
+sample578 0 1 1
+sample579 0 1 1
+sample580 0 1 1
+sample581 0 1 1
+sample582 0 1 1
+sample583 0 1 1
+sample584 0 1 1
+sample585 0 1 1
+sample586 0 1 1
+sample587 0 1 1
+sample588 0 1 1
+sample589 0 1 1
+sample590 0 1 1
+sample591 0 1 1
+sample592 0 1 1
+sample593 0 1 1
+sample594 0 1 1
+sample595 0 1 1
+sample596 0 1 1
+sample597 0 1 1
+sample598 0 1 1
+sample599 0 1 1
+sample600 0 1 1
+sample601 0 1 1
+sample602 0 1 1
+sample603 0 1 1
+sample604 0 1 1
+sample605 0 1 1
+sample606 0 1 1
+sample607 0 1 1
+sample608 0 1 1
+sample609 0 1 1
+sample610 0 1 1
+sample611 0 1 1
+sample612 0 1 1
+sample613 0 1 1
+sample614 0 1 1
+sample615 0 1 1
+sample616 0 1 1
+sample617 0 1 1
+sample618 0 1 1
+sample619 0 1 1
+sample620 0 1 1
+sample621 0 1 1
+sample622 0 1 1
+sample623 0 1 1
+sample624 0 1 1
+sample625 0 1 1
+sample626 0 1 1
+sample627 0 1 1
+sample628 0 1 1
+sample629 0 1 1
+sample630 0 1 1
+sample631 0 1 1
+sample632 0 1 1
+sample633 0 1 1
+sample634 0 1 1
+sample635 0 1 1
+sample636 0 1 1
+sample637 0 1 1
+sample638 0 1 1
+sample639 0 1 1
+sample640 0 1 1
+sample641 0 1 1
+sample642 0 1 1
+sample643 0 1 1
+sample644 0 1 1
+sample645 0 1 1
+sample646 0 1 1
+sample647 0 1 1
+sample648 0 1 1
+sample649 0 1 1
+sample650 0 1 1
+sample651 0 1 1
+sample652 0 1 1
+sample653 0 1 1
+sample654 0 1 1
+sample655 0 1 1
+sample656 0 1 1
+sample657 0 1 1
+sample658 0 1 1
+sample659 0 1 1
+sample660 0 1 1
+sample661 0 1 1
+sample662 0 1 1
+sample663 0 1 1
+sample664 0 1 1
+sample665 0 1 1
+sample666 0 1 1
+sample667 0 1 1
+sample668 0 1 1
+sample669 0 1 1
+sample670 0 1 1
+sample671 0 1 1
+sample672 0 1 1
+sample673 0 1 1
+sample674 0 1 1
+sample675 0 1 1
+sample676 0 1 1
+sample677 0 1 1
+sample678 0 1 1
+sample679 0 1 1
+sample680 0 1 1
+sample681 0 1 1
+sample682 0 1 1
+sample683 0 1 1
+sample684 0 1 1
+sample685 0 1 1
+sample686 0 1 1
+sample687 0 1 1
+sample688 0 1 1
+sample689 0 1 1
+sample690 0 1 1
+sample691 0 1 1
+sample692 0 1 1
+sample693 0 1 1
+sample694 0 1 1
+sample695 0 1 1
+sample696 0 1 1
+sample697 0 1 1
+sample698 0 1 1
+sample699 0 1 1
+sample700 0 1 1
+sample701 0 1 1
+sample702 0 1 1
+sample703 0 1 1
+sample704 0 1 1
+sample705 0 1 1
+sample706 0 1 1
+sample707 0 1 1
+sample708 0 1 1
+sample709 0 1 1
+sample710 0 1 1
+sample711 0 1 1
+sample712 0 1 1
+sample713 0 1 1
+sample714 0 1 1
+sample715 0 1 1
+sample716 0 1 1
+sample717 0 1 1
+sample718 0 1 1
+sample719 0 1 1
+sample720 0 1 1
+sample721 0 1 1
+sample722 0 1 1
+sample723 0 1 1
+sample724 0 1 1
+sample725 0 1 1
+sample726 0 1 1
+sample727 0 1 1
+sample728 0 1 1
+sample729 0 1 1
+sample730 0 1 1
+sample731 0 1 1
+sample732 0 1 1
+sample733 0 1 1
+sample734 0 1 1
+sample735 0 1 1
+sample736 0 1 1
+sample737 0 1 1
+sample738 0 1 1
+sample739 0 1 1
+sample740 0 1 1
+sample741 0 1 1
+sample742 0 1 1
+sample743 0 1 1
+sample744 0 1 1
+sample745 0 1 1
+sample746 0 1 1
+sample747 0 1 1
+sample748 0 1 1
+sample749 0 1 1
+sample750 0 1 1
+sample751 0 1 1
+sample752 0 1 1
+sample753 0 1 1
+sample754 0 1 1
+sample755 0 1 1
+sample756 0 1 1
+sample757 0 1 1
+sample758 0 1 1
+sample759 0 1 1
+sample760 0 1 1
+sample761 0 1 1
+sample762 0 1 1
+sample763 0 1 1
+sample764 0 1 1
+sample765 0 1 1
+sample766 0 1 1
+sample767 0 1 1
+sample768 0 1 1
+sample769 0 1 1
+sample770 0 1 1
+sample771 0 1 1
+sample772 0 1 1
+sample773 0 1 1
+sample774 0 1 1
+sample775 0 1 1
+sample776 0 1 1
+sample777 0 1 1
+sample778 0 1 1
+sample779 0 1 1
+sample780 0 1 1
+sample781 0 1 1
+sample782 0 1 1
+sample783 0 1 1
+sample784 0 1 1
+sample785 0 1 1
+sample786 0 1 1
+sample787 0 1 1
+sample788 0 1 1
+sample789 0 1 1
+sample790 0 1 1
+sample791 0 1 1
+sample792 0 1 1
+sample793 0 1 1
+sample794 0 1 1
+sample795 0 1 1
+sample796 0 1 1
+sample797 0 1 1
+sample798 0 1 1
+sample799 0 1 1
+sample800 0 1 1
+sample801 0 1 1
+sample802 0 1 1
+sample803 0 1 1
+sample804 0 1 1
+sample805 0 1 1
+sample806 0 1 1
+sample807 0 1 1
+sample808 0 1 1
+sample809 0 1 1
+sample810 0 1 1
+sample811 0 1 1
+sample812 0 1 1
+sample813 0 1 1
+sample814 0 1 1
+sample815 0 1 1
+sample816 0 1 1
+sample817 0 1 1
+sample818 0 1 1
+sample819 0 1 1
+sample820 0 1 1
+sample821 0 1 1
+sample822 0 1 1
+sample823 0 1 1
+sample824 0 1 1
+sample825 0 1 1
+sample826 0 1 1
+sample827 0 1 1
+sample828 0 1 1
+sample829 0 1 1
+sample830 0 1 1
+sample831 0 1 1
+sample832 0 1 1
+sample833 0 1 1
+sample834 0 1 1
+sample835 0 1 1
+sample836 0 1 1
+sample837 0 1 1
+sample838 0 1 1
+sample839 0 1 1
+sample840 0 1 1
+sample841 0 1 1
+sample842 0 1 1
+sample843 0 1 1
+sample844 0 1 1
+sample845 0 1 1
+sample846 0 1 1
+sample847 0 1 1
+sample848 0 1 1
+sample849 0 1 1
+sample850 0 1 1
+sample851 0 1 1
+sample852 0 1 1
+sample853 0 1 1
+sample854 0 1 1
+sample855 0 1 1
+sample856 0 1 1
+sample857 0 1 1
+sample858 0 1 1
+sample859 0 1 1
+sample860 0 1 1
+sample861 0 1 1
+sample862 0 1 1
+sample863 0 1 1
+sample864 0 1 1
+sample865 0 1 1
+sample866 0 1 1
+sample867 0 1 1
+sample868 0 1 1
+sample869 0 1 1
+sample870 0 1 1
+sample871 0 1 1
+sample872 0 1 1
+sample873 0 1 1
+sample874 0 1 1
+sample875 0 1 1
+sample876 0 1 1
+sample877 0 1 1
+sample878 0 1 1
+sample879 0 1 1
+sample880 0 1 1
+sample881 0 1 1
+sample882 0 1 1
+sample883 0 1 1
+sample884 0 1 1
+sample885 0 1 1
+sample886 0 1 1
+sample887 0 1 1
+sample888 0 1 1
+sample889 0 1 1
+sample890 0 1 1
+sample891 0 1 1
+sample892 0 1 1
+sample893 0 1 1
+sample894 0 1 1
+sample895 0 1 1
+sample896 0 1 1
+sample897 0 1 1
+sample898 0 1 1
+sample899 0 1 1
+sample900 0 1 1
+sample901 0 1 1
+sample902 0 1 1
+sample903 0 1 1
+sample904 0 1 1
+sample905 0 1 1
+sample906 0 1 1
+sample907 0 1 1
+sample908 0 1 1
+sample909 0 1 1
+sample910 0 1 1
+sample911 0 1 1
+sample912 0 1 1
+sample913 0 1 1
+sample914 0 1 1
+sample915 0 1 1
+sample916 0 1 1
+sample917 0 1 1
+sample918 0 1 1
+sample919 0 1 1
+sample920 0 1 1
+sample921 0 1 1
+sample922 0 1 1
+sample923 0 1 1
+sample924 0 1 1
+sample925 0 1 1
+sample926 0 1 1
+sample927 0 1 1
+sample928 0 1 1
+sample929 0 1 1
+sample930 0 1 1
+sample931 0 1 1
+sample932 0 1 1
+sample933 0 1 1
+sample934 0 1 1
+sample935 0 1 1
+sample936 0 1 1
+sample937 0 1 1
+sample938 0 1 1
+sample939 0 1 1
+sample940 0 1 1
+sample941 0 1 1
+sample942 0 1 1
+sample943 0 1 1
+sample944 0 1 1
+sample945 0 1 1
+sample946 0 1 1
+sample947 0 1 1
+sample948 0 1 1
+sample949 0 1 1
+sample950 0 1 1
+sample951 0 1 1
+sample952 0 1 1
+sample953 0 1 1
+sample954 0 1 1
+sample955 0 1 1
+sample956 0 1 1
+sample957 0 1 1
+sample958 0 1 1
+sample959 0 1 1
+sample960 0 1 1
+sample961 0 1 1
+sample962 0 1 1
+sample963 0 1 1
+sample964 0 1 1
+sample965 0 1 1
+sample966 0 1 1
+sample967 0 1 1
+sample968 0 1 1
+sample969 0 1 1
+sample970 0 1 1
+sample971 0 1 1
+sample972 0 1 1
+sample973 0 1 1
+sample974 0 1 1
+sample975 0 1 1
+sample976 0 1 1
+sample977 0 1 1
+sample978 0 1 1
+sample979 0 1 1
+sample980 0 1 1
+sample981 0 1 1
+sample982 0 1 1
+sample983 0 1 1
+sample984 0 1 1
+sample985 0 1 1
+sample986 0 1 1
+sample987 0 1 1
+sample988 0 1 1
+sample989 0 1 1
+sample990 0 1 1
+sample991 0 1 1
+sample992 0 1 1
+sample993 0 1 1
+sample994 0 1 1
+sample995 0 1 1
+sample996 0 1 1
+sample997 0 1 1
+sample998 0 1 1
+sample999 0 1 1
+sample1000 0 1 1

opticall/filtering.cpp

 
 /********************* Read gender file ******************************/
 
-vector<int> readInfoFile(string fname, vector<string> allsamples, MatrixXi &samplegenders) {
+vector<int> readInfoFile(string fname, vector<string> allsamples, MatrixXi &samplegenders, MatrixXi &samplebatches) {
 
 	string line;
 	
 	vector<string> infosampleids;
 	vector<int> infosamplegender;
 	vector<int> infosampleexclude;
+	vector<int> infosamplebatch;
 	
 	ifstream myfile (fname.c_str());
 	
 				continue;
 			}
 			
-			//linedata[0] is the sampleid, linedata[1] is the sex, linedata[2] is the exclusion flag
+			//linedata[0] is the sampleid, linedata[1] is the sex, linedata[2] is the exclusion flag, linedata[3] is the batch
 			infosampleids.push_back(linedata[0]);
 			infosamplegender.push_back(atoi(linedata[1].c_str()));
 			infosampleexclude.push_back(atoi(linedata[2].c_str()));
+            infosamplebatch.push_back(atoi(linedata[3].c_str()));
 			
 			
 		}
 	for (int i = 0; i < allsamples.size(); i++)
 	{
 		samplegenders(i,0) = 0;
+        samplebatches(i,0) = 0;
 		for (int j = 0; j < infosampleids.size(); j++ )
 		{
 			if ( allsamples[i] == infosampleids[j] && infosampleexclude[j] == 1 &&  find (exclusion_indices.begin(), exclusion_indices.end(), i)  ==   exclusion_indices.end()  ) {
 			}
 			if ( allsamples[i] == infosampleids[j]  ) {
 				samplegenders(i,0) = infosamplegender[j];
+                samplebatches(i,0) = infosamplebatch[j];
 			}
 		}
 	}

opticall/filtering.h

 std::vector<std::string> individualsForCalling(std::vector<std::string> individuals, std::vector<int> excluded);
 std::vector<int> findIntensityOutliers(std::string fname, int snpCount, std::vector<std::string> individuals,double numsds, std::vector<int> exclude_list);
 Eigen::MatrixXd fetchRandomIntensities(std::string fname, int sample_block_size, int snpcount, std::vector<std::string> individuals, std::vector<int> initial_outliers);
-std::vector<int> readInfoFile(std::string fname, std::vector<std::string> allsamples, Eigen::MatrixXi &samplegenders);
+std::vector<int> readInfoFile(std::string fname, std::vector<std::string> allsamples, Eigen::MatrixXi &samplegenders, Eigen::MatrixXi &samplebatches );
 std::vector<int> combineExclusionLists(std::vector<int> list1, std::vector<int> list2);
 
 

opticall/inclusions.h

 #include <iostream>
 #include <fstream>
 #include <vector>
+#include <map>
 #include <ctime>
 #include <string>
 #include <limits>
 #include <boost/tokenizer.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/math/distributions/chi_squared.hpp>
+#include <boost/math/distributions/normal.hpp>
 
 #include <Eigen/Core>
 #include <Eigen/LU>

opticall/opticall.cpp

 
 MatrixXd sortedmatrix(MatrixXd matrix, int axis, vector<int>argsorts) {
 
-	MatrixXd sortedoutput(matrix.rows(), matrix.cols());
-	int loopnumber = matrix.rows();
+	MatrixXd sortedoutput = MatrixXd::Zero(matrix.rows(), matrix.cols());
+	int loopnumber = matrix.cols();
 	if (axis == 1){
-		loopnumber = matrix.cols();
+		loopnumber = matrix.rows();
 	}
 	for (int i = 0; i < loopnumber; i++)
 	{
 		if (axis == 0) {
-			sortedoutput.col(i) = matrix.row(argsorts[i]);
+			sortedoutput.col(i) = matrix.col(argsorts[i]);
 		}
 		else {
 			sortedoutput.row(i) =	matrix.row(argsorts[i]);
 		}
 	}
+
 	return sortedoutput;
 }
 
 
-
-
-
+/********************* Approx quantile fn. for low p-vals**************/
+
+
+double approx_quantile(double p)
+{
+    
+    //Approximation to normal zscore 
+    //from http://www.johndcook.com/normal_cdf_inverse.html
+    //originally from Abramowitz and Stegun
+    //Handbook of Mathematical Functions: with Formulas, Graphs, and Mathematical Tables
+    
+    double t = sqrt(log(1/(p*p)));
+    
+    double c0 = 2.515517;
+    double c1 = 0.802853;
+    double c2 = 0.010328;
+    double d1 = 1.432788;
+    double d2 = 0.189269;
+    double d3 = 0.001308;
+    
+    double numerator = c0 + c1*t + c2*t*t;
+    double denomenator = 1 + d1*t + d2*t*t + d3*t*t*t;
+    
+    return t-numerator/denomenator;
+    
+}
+
+
+
+double approx_right_tail_cdf(double z)
+{
+    
+    //Approximation to right normal tail integral 
+    //from "A UNIFORM APPROXIMATION TO THE RIGHT NORMAL TAIL INTEGRAL"
+    //W. BRYC
+    //formula (11) By Hart
+    //A Close Approximation Related to the Error Function
+    //http://www.ams.org/journals/mcom/1966-20-096/S0025-5718-1966-0203907-1/S0025-5718-1966-0203907-1.pdf
+    
+
+    
+    double p0 = sqrt(M_PI/2);
+    double a = (1+sqrt(1-2*M_PI*M_PI+6*M_PI)) / (2*M_PI);
+    double b = 2*M_PI*a*a;
+    
+    double multiplier = exp(-1*z*z/2)/(sqrt(2*M_PI)*z);
+    double numerator = sqrt(1+b*z*z )/(1+a*z*z );
+    
+    double denomenator =  p0*z + sqrt( p0*p0*z*z + exp(-1*z*z/2)*numerator   );
+    
+    
+
+    
+    return multiplier*(1-numerator/denomenator);
+    
+}
 
 
 
 
 
 
-MatrixXd strip_nans(const MatrixXd &inputdata, vector<int> &nan_indices, bool nonorm, double &outlier_range, bool set_outlier_range, vector<int> &exclude_list, vector<int> &excluded_samples) {
+MatrixXd strip_nans(const MatrixXd &inputdata, vector<int> &nan_indices, bool nonorm, double &outlier_range, bool set_outlier_range, vector<int> &exclude_list, vector<int> &excluded_samples, MatrixXi &genders, MatrixXi &batches) {
 
 	vector<int> num_indices;
+	
+	vector<int> infofile_excluded_indices;
 
 	for (int i = 0; i < inputdata.rows(); i++)
 	{
 		{
 			//these samples have been excluded from the info file
 			//don't add it to the numeric indices, nor the nan indices - so the output isn't reinflated to include it
+			infofile_excluded_indices.push_back(i);
 		}
 		else if ( isnan( inputdata.row(i).sum() )  )
 		{
 
 	//cout << "numeric data" << endl;
 	
-	if (num_indices.size() == 0 || nonorm) {
+	if (num_indices.size() == 0) {
 		return num_data;
 	}
 	
 	//I could now look for outliers - and then use num_indices[i] as the exclusion
 	
 	vector<int> outlier_indices;
+    MatrixXd clean_data = num_data;
 	
-	
-	
-	MatrixXd clean_data = strip_outliers(num_data, outlier_indices, outlier_range, set_outlier_range);
-	
+	if (!nonorm)
+    {
+        clean_data = strip_outliers(num_data, outlier_indices, outlier_range, set_outlier_range);
+	}
 
 	for (int i =0; i < outlier_indices.size(); i++)
 	{
 		//cout << "stripping SNPwise outlier at " << inputdata.row(num_indices[outlier_indices[i]]) << endl;
 	}
 	
+	
+
 	sort (nan_indices.begin(), nan_indices.end(), lessthanfunction);
+
 	
 	cout << "EXCLUSION CHECK" << endl;
 	for (int i =0; i < nan_indices.size(); i++)
 	{
 		cout << "i is: " << nan_indices[i] << " and data point is: " << inputdata.row(nan_indices[i]) << endl;
 	}
-	cout << "----------" << endl;
-
+
+
+
+	//Handling creating the correct gender data taking into account removals etc.
+	vector<int> combinedexcluded_indices(nan_indices);
+	combinedexcluded_indices.insert(combinedexcluded_indices.end(), infofile_excluded_indices.begin(), infofile_excluded_indices.end());
+	sort (combinedexcluded_indices.begin(), combinedexcluded_indices.end(), lessthanfunction);
+	
+    //cout << combinedexcluded_indices.size() << " combined excluded" << endl;
+	
+	MatrixXi new_gender_data(clean_data.rows(),1);
+	MatrixXi new_batch_data(clean_data.rows(),1);
+    //cout << genders.rows() << " " << new_gender_data.rows();
+	int counter = 0;
+	for (int i = 0; i < inputdata.rows() ; i++)
+	{
+		if (!(combinedexcluded_indices.size() > 0  && find (combinedexcluded_indices.begin(), combinedexcluded_indices.end(), i)  !=   combinedexcluded_indices.end())) 
+		{
+			new_gender_data(counter,0) = genders(i,0);
+            new_batch_data(counter,0) = batches(i,0);
+			counter++;
+		}
+
+	}
+	genders = new_gender_data;
+    batches = new_batch_data;
+	
+	
+	
 	return clean_data;
 
 
 
 
 
+/************************ Functions to remove samples before inferring mixture models, and reinsert them right after *******************/
+
+MatrixXd strip_from_line_inference(const MatrixXd &inputdata, vector<int> &removed_indices, double outlier_range, MatrixXi &genders) {
+
+
+    
+    vector<int> num_indices;
+	MatrixXd distances = inputdata.rowwise().norm();
+	
+	double mean_dist = distances.mean();
+	double sd_dist = sd_of_data(distances)(0,0);
+	
+	
+	for (int i = 0; i < distances.rows(); i++)
+	{
+		if ( distances(i,0) > mean_dist +  outlier_range )
+		{
+			removed_indices.push_back(i); 
+			cout << "excluding point " << i << " with values:  " <<  inputdata.row(i) << " and distance: " << inputdata.row(i).norm() << " from inference." << endl;
+		}
+		else
+		{
+			num_indices.push_back(i);
+		}
+	}
+	
+	MatrixXd num_data(num_indices.size(),inputdata.cols());
+    MatrixXi new_gender_data(num_indices.size(),genders.cols());
+	for (int i =0; i < num_indices.size(); i++)
+	{
+		num_data.row(i) = inputdata.row(num_indices[i]);
+        new_gender_data.row(i) = genders.row(num_indices[i]);
+	}
+    
+    genders = new_gender_data;
+	
+	return num_data;
+    
+    
+    
+
+}
+
+
+
 
 
 
 
 
 
+
+void mus_covs_for_Y_MT(MatrixXd &block_data, MatrixXd &starting_mus, vector<MatrixXd> &starting_covars, MatrixXd &starting_js, int dim) {
+    
+
+    //get the lowest x% of the data
+        //next figure out the 
+            //y% with the lowest y values
+            //y% with the lowest x values 
+    //use these to set up the 3 genotype classes
+    
+    MatrixXd distances = block_data.rowwise().norm();
+    
+    
+    //cout << distances << endl;
+    
+    vector<int> sorteddistinds = argsort(distances,1, 0, false);
+    
+    /*
+    for (int i = 0; i < sorteddistinds.size() ; i++)
+    {
+        cout << sorteddistinds[i] << endl;
+    }
+    cout << sorteddistinds.size() << endl;
+    */
+    
+    MatrixXd sortedbydist  = sortedmatrix(block_data, 1, sorteddistinds);
+    
+    //cout << sortedbydist << endl;
+    
+    //split this matrix into bottom x% of rows - and rest
+    int bottom_set = (int) (5*sortedbydist.rows()/100);
+    
+    MatrixXd bottom_data = sortedbydist.block(0,0,bottom_set,dim);
+    MatrixXd rest_of_data = sortedbydist.block(bottom_set,0,sortedbydist.rows()-bottom_set,dim);
+    
+    
+    //next - need to sort rest of data based on x and y values
+    vector<int> sorted_low_y_inds = argsort(rest_of_data,1, 1, false);
+    vector<int> sorted_low_x_inds = argsort(rest_of_data,1, 0, false);    
+    
+    int bottom_set_x = (int) (25*rest_of_data.rows()/100);
+    int bottom_set_y = (int) (25*rest_of_data.rows()/100);
+    
+    MatrixXd x_homs = sortedmatrix(rest_of_data, 1, sorted_low_y_inds).block(0,0,bottom_set_x,dim);
+    MatrixXd y_homs = sortedmatrix(rest_of_data, 1, sorted_low_x_inds).block(0,0,bottom_set_y,dim);    
+    
+    
+    //then get means and covars - and done!
+    
+    MatrixXd mu_hom_x = x_homs.colwise().sum()/x_homs.rows();
+    MatrixXd mu_hom_y = y_homs.colwise().sum()/y_homs.rows();
+    MatrixXd mu_zeros = bottom_data.colwise().sum()/bottom_data.rows();
+    
+    cout << "Y chrom mus are" << endl;
+    cout << mu_hom_x << " x_homs " << endl;
+    cout << mu_hom_y << " y_homs " << endl;    
+    cout << mu_zeros << " zeros " << endl;      
+    
+    
+    //then get covariance matrices
+    MatrixXd cov_hom_x =   (x_homs - mu_hom_x.replicate(x_homs.rows(), 1)).transpose() * (x_homs - mu_hom_x.replicate(x_homs.rows(), 1)) / x_homs.rows();
+    MatrixXd cov_hom_y =   (y_homs - mu_hom_y.replicate(y_homs.rows(), 1)).transpose() * (y_homs - mu_hom_y.replicate(y_homs.rows(), 1)) / y_homs.rows();