partis-bcr 1.0.5__py3-none-any.whl → 1.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. bin/partis-test.py +4 -1
  2. packages/ham/bcrham +0 -0
  3. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/partis-test.py +4 -1
  4. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/METADATA +2 -1
  5. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/RECORD +98 -139
  6. python/utils.py +1 -1
  7. test/new-results/test/parameters/simu/hmm/all-mean-mute-freqs.csv +3 -3
  8. test/new-results/test/parameters/simu/hmm/all-mean-n-muted.csv +11 -11
  9. test/new-results/test/parameters/simu/hmm/all-probs.csv +3 -13
  10. test/new-results/test/parameters/simu/hmm/cluster_size.csv +1 -1
  11. test/new-results/test/parameters/simu/hmm/d-mean-mute-freqs.csv +6 -6
  12. test/new-results/test/parameters/simu/hmm/d-mean-n-muted.csv +3 -3
  13. test/new-results/test/parameters/simu/hmm/d_gene-d_3p_del-probs.csv +1 -6
  14. test/new-results/test/parameters/simu/hmm/d_gene-d_5p_del-probs.csv +2 -9
  15. test/new-results/test/parameters/simu/hmm/d_gene-probs.csv +1 -5
  16. test/new-results/test/parameters/simu/hmm/d_gene-vd_insertion-probs.csv +2 -10
  17. test/new-results/test/parameters/simu/hmm/dj_insertion_content.csv +4 -4
  18. test/new-results/test/parameters/simu/hmm/fv_insertion-probs.csv +2 -3
  19. test/new-results/test/parameters/simu/hmm/germline-sets/igh/extras.csv +0 -6
  20. test/new-results/test/parameters/simu/hmm/germline-sets/igh/ighd.fasta +0 -8
  21. test/new-results/test/parameters/simu/hmm/germline-sets/igh/ighj.fasta +0 -2
  22. test/new-results/test/parameters/simu/hmm/germline-sets/igh/ighv.fasta +0 -10
  23. test/new-results/test/parameters/simu/hmm/hmms/IGHD6-13_star_01.yaml +268 -267
  24. test/new-results/test/parameters/simu/hmm/hmms/IGHJ4_star_02.yaml +306 -306
  25. test/new-results/test/parameters/simu/hmm/hmms/IGHJ6_star_02.yaml +284 -284
  26. test/new-results/test/parameters/simu/hmm/hmms/IGHV3-66_star_02.yaml +1191 -1191
  27. test/new-results/test/parameters/simu/hmm/hmms/IGHV3-7_star_05.yaml +2 -2
  28. test/new-results/test/parameters/simu/hmm/j-mean-mute-freqs.csv +5 -5
  29. test/new-results/test/parameters/simu/hmm/j-mean-n-muted.csv +4 -4
  30. test/new-results/test/parameters/simu/hmm/j_gene-dj_insertion-probs.csv +2 -9
  31. test/new-results/test/parameters/simu/hmm/j_gene-j_3p_del-probs.csv +1 -2
  32. test/new-results/test/parameters/simu/hmm/j_gene-j_5p_del-probs.csv +2 -7
  33. test/new-results/test/parameters/simu/hmm/j_gene-probs.csv +1 -2
  34. test/new-results/test/parameters/simu/hmm/jf_insertion-probs.csv +1 -1
  35. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHD6-13_star_01.csv +13 -16
  36. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHJ4_star_02.csv +40 -44
  37. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHJ6_star_02.csv +0 -2
  38. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV3-66_star_02.csv +291 -293
  39. test/new-results/test/parameters/simu/hmm/seq_content.csv +4 -4
  40. test/new-results/test/parameters/simu/hmm/v-mean-mute-freqs.csv +3 -3
  41. test/new-results/test/parameters/simu/hmm/v-mean-n-muted.csv +7 -7
  42. test/new-results/test/parameters/simu/hmm/v_gene-probs.csv +1 -6
  43. test/new-results/test/parameters/simu/hmm/v_gene-v_3p_del-probs.csv +1 -7
  44. test/new-results/test/parameters/simu/hmm/v_gene-v_5p_del-probs.csv +1 -6
  45. test/new-results/test/parameters/simu/hmm/vd_insertion_content.csv +4 -4
  46. test/new-results/test/parameters/simu/sw/all-mean-mute-freqs.csv +3 -3
  47. test/new-results/test/parameters/simu/sw/all-mean-n-muted.csv +8 -8
  48. test/new-results/test/parameters/simu/sw/all-probs.csv +1 -9
  49. test/new-results/test/parameters/simu/sw/cluster_size.csv +1 -1
  50. test/new-results/test/parameters/simu/sw/d-mean-mute-freqs.csv +5 -5
  51. test/new-results/test/parameters/simu/sw/d-mean-n-muted.csv +3 -3
  52. test/new-results/test/parameters/simu/sw/d_gene-d_3p_del-probs.csv +1 -7
  53. test/new-results/test/parameters/simu/sw/d_gene-d_5p_del-probs.csv +1 -7
  54. test/new-results/test/parameters/simu/sw/d_gene-probs.csv +1 -5
  55. test/new-results/test/parameters/simu/sw/d_gene-vd_insertion-probs.csv +1 -8
  56. test/new-results/test/parameters/simu/sw/dj_insertion_content.csv +4 -4
  57. test/new-results/test/parameters/simu/sw/fv_insertion-probs.csv +1 -1
  58. test/new-results/test/parameters/simu/sw/germline-sets/igh/extras.csv +0 -6
  59. test/new-results/test/parameters/simu/sw/germline-sets/igh/ighd.fasta +0 -8
  60. test/new-results/test/parameters/simu/sw/germline-sets/igh/ighj.fasta +0 -2
  61. test/new-results/test/parameters/simu/sw/germline-sets/igh/ighv.fasta +0 -10
  62. test/new-results/test/parameters/simu/sw/hmms/IGHD6-13_star_01.yaml +268 -267
  63. test/new-results/test/parameters/simu/sw/hmms/IGHJ4_star_02.yaml +306 -306
  64. test/new-results/test/parameters/simu/sw/hmms/IGHJ6_star_02.yaml +22 -22
  65. test/new-results/test/parameters/simu/sw/hmms/IGHV3-66_star_02.yaml +1191 -1191
  66. test/new-results/test/parameters/simu/sw/hmms/IGHV3-7_star_05.yaml +2 -2
  67. test/new-results/test/parameters/simu/sw/j-mean-mute-freqs.csv +4 -4
  68. test/new-results/test/parameters/simu/sw/j-mean-n-muted.csv +3 -3
  69. test/new-results/test/parameters/simu/sw/j_gene-dj_insertion-probs.csv +1 -7
  70. test/new-results/test/parameters/simu/sw/j_gene-j_3p_del-probs.csv +1 -2
  71. test/new-results/test/parameters/simu/sw/j_gene-j_5p_del-probs.csv +1 -7
  72. test/new-results/test/parameters/simu/sw/j_gene-probs.csv +1 -2
  73. test/new-results/test/parameters/simu/sw/jf_insertion-probs.csv +1 -1
  74. test/new-results/test/parameters/simu/sw/mute-freqs/IGHD6-13_star_01.csv +13 -16
  75. test/new-results/test/parameters/simu/sw/mute-freqs/IGHJ4_star_02.csv +40 -48
  76. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV3-66_star_02.csv +291 -293
  77. test/new-results/test/parameters/simu/sw/seq_content.csv +4 -4
  78. test/new-results/test/parameters/simu/sw/v-mean-mute-freqs.csv +3 -3
  79. test/new-results/test/parameters/simu/sw/v-mean-n-muted.csv +7 -7
  80. test/new-results/test/parameters/simu/sw/v_gene-probs.csv +1 -6
  81. test/new-results/test/parameters/simu/sw/v_gene-v_3p_del-probs.csv +1 -7
  82. test/new-results/test/parameters/simu/sw/v_gene-v_5p_del-probs.csv +1 -6
  83. test/new-results/test/parameters/simu/sw/vd_insertion_content.csv +4 -4
  84. test/new-results/test/parameters/simu/sw-cache.yaml +1 -1
  85. test/new-results/test.log +24 -258
  86. test/test.py +4 -1
  87. bin/partis-pip +0 -116
  88. test/new-results/test/parameters/simu/hmm/hmms/IGHD1-20_star_01.yaml +0 -449
  89. test/new-results/test/parameters/simu/hmm/hmms/IGHD3-16_star_02.yaml +0 -870
  90. test/new-results/test/parameters/simu/hmm/hmms/IGHD3-22_star_01.yaml +0 -744
  91. test/new-results/test/parameters/simu/hmm/hmms/IGHD6-19_star_01.yaml +0 -534
  92. test/new-results/test/parameters/simu/hmm/hmms/IGHJ1_star_01.yaml +0 -986
  93. test/new-results/test/parameters/simu/hmm/hmms/IGHV1-18_star_01.yaml +0 -4484
  94. test/new-results/test/parameters/simu/hmm/hmms/IGHV3-23_star_01.yaml +0 -4484
  95. test/new-results/test/parameters/simu/hmm/hmms/IGHV4-4_star_09.yaml +0 -4438
  96. test/new-results/test/parameters/simu/hmm/hmms/IGHV4-61_star_01.yaml +0 -4529
  97. test/new-results/test/parameters/simu/hmm/hmms/IGHV5-51_star_01.yaml +0 -4484
  98. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHD1-20_star_01.csv +0 -9
  99. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHD3-16_star_02.csv +0 -30
  100. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHD3-22_star_01.csv +0 -32
  101. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHD6-19_star_01.csv +0 -22
  102. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHJ1_star_01.csv +0 -50
  103. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV1-18_star_01.csv +0 -297
  104. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV3-23_star_01.csv +0 -297
  105. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV4-4_star_09.csv +0 -291
  106. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV4-61_star_01.csv +0 -300
  107. test/new-results/test/parameters/simu/hmm/mute-freqs/IGHV5-51_star_01.csv +0 -296
  108. test/new-results/test/parameters/simu/sw/hmms/IGHD1-20_star_01.yaml +0 -449
  109. test/new-results/test/parameters/simu/sw/hmms/IGHD3-16_star_02.yaml +0 -870
  110. test/new-results/test/parameters/simu/sw/hmms/IGHD3-22_star_01.yaml +0 -744
  111. test/new-results/test/parameters/simu/sw/hmms/IGHD6-19_star_01.yaml +0 -534
  112. test/new-results/test/parameters/simu/sw/hmms/IGHJ1_star_01.yaml +0 -986
  113. test/new-results/test/parameters/simu/sw/hmms/IGHV1-18_star_01.yaml +0 -4484
  114. test/new-results/test/parameters/simu/sw/hmms/IGHV3-23_star_01.yaml +0 -4484
  115. test/new-results/test/parameters/simu/sw/hmms/IGHV4-4_star_09.yaml +0 -4438
  116. test/new-results/test/parameters/simu/sw/hmms/IGHV4-61_star_01.yaml +0 -4529
  117. test/new-results/test/parameters/simu/sw/hmms/IGHV5-51_star_01.yaml +0 -4484
  118. test/new-results/test/parameters/simu/sw/mute-freqs/IGHD1-20_star_01.csv +0 -9
  119. test/new-results/test/parameters/simu/sw/mute-freqs/IGHD3-16_star_02.csv +0 -30
  120. test/new-results/test/parameters/simu/sw/mute-freqs/IGHD3-22_star_01.csv +0 -32
  121. test/new-results/test/parameters/simu/sw/mute-freqs/IGHD6-19_star_01.csv +0 -20
  122. test/new-results/test/parameters/simu/sw/mute-freqs/IGHJ1_star_01.csv +0 -50
  123. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV1-18_star_01.csv +0 -297
  124. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV3-23_star_01.csv +0 -297
  125. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV4-4_star_09.csv +0 -291
  126. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV4-61_star_01.csv +0 -300
  127. test/new-results/test/parameters/simu/sw/mute-freqs/IGHV5-51_star_01.csv +0 -296
  128. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/cf-alleles.py +0 -0
  129. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/cf-germlines.py +0 -0
  130. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/compare-plotdirs.py +0 -0
  131. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/extract-pairing-info.py +0 -0
  132. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/gctree-run.py +0 -0
  133. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/get-naive-probabilities.py +0 -0
  134. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/parse-output.py +0 -0
  135. {partis_bcr-1.0.5.data → partis_bcr-1.0.7.data}/scripts/split-loci.py +0 -0
  136. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/WHEEL +0 -0
  137. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/entry_points.txt +0 -0
  138. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/licenses/COPYING +0 -0
  139. {partis_bcr-1.0.5.dist-info → partis_bcr-1.0.7.dist-info}/top_level.txt +0 -0
test/new-results/test.log CHANGED
@@ -1,265 +1,31 @@
1
- cache-parameters-simu partis cache-parameters --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --is-simu --random-seed 1 --n-procs 10
1
+ cache-parameters-quick-new-simu partis cache-parameters --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --n-max-queries 10 --random-seed 1 --n-procs 10
2
+ --n-max-queries: stopped after reading 10 queries from input file
2
3
  caching parameters
3
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
4
- keeping 7 / 198 v genes
5
- missing 8 simulation genes (counts): hv1-202 0 hv2-502 0 hv2-70D04 0 hv3-1104 0 hv3-69-102 0 hv3-902 0 hv4-3401 0 hv4-3909 0
4
+ vsearch: 10 / 10 v annotations (0 failed) with 2 v genes in 0.0 sec
5
+ keeping 2 / 198 v genes
6
6
  smith-waterman (new-allele fitting)
7
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
7
+ vsearch: 10 / 10 v annotations (0 failed) with 2 v genes in 0.0 sec
8
8
  removing old sw cache test/new-results/test/parameters/simu/sw-cache.yaml
9
- running 10 procs for 36 seqs
10
- running 11 procs for 1 seq
11
- info for 36 / 36 = 1.000 (removed: 0 failed)
12
- kept 18 (0.500) unproductive
13
- water time: 0.1 (ig-sw 0.0 processing 0.0)
9
+ running 10 procs for 10 seqs
10
+ info for 10 / 10 = 1.000 (removed: 0 failed)
11
+ kept 10 (1.000) unproductive
12
+ water time: 0.0 (ig-sw 0.0 processing 0.0)
14
13
  smith-waterman (writing parameters)
15
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
16
- running 10 procs for 36 seqs
17
- running 11 procs for 1 seq
18
- info for 36 / 36 = 1.000 (removed: 0 failed)
19
- kept 18 (0.500) unproductive
14
+ vsearch: 10 / 10 v annotations (0 failed) with 2 v genes in 0.0 sec
15
+ running 10 procs for 10 seqs
16
+ info for 10 / 10 = 1.000 (removed: 0 failed)
17
+ kept 10 (1.000) unproductive
20
18
  writing sw results to test/new-results/test/parameters/simu/sw-cache.yaml
21
- writing parameters to test/new-results/test/parameters/simu/sw (0.9 sec)
22
- water time: 1.0 (ig-sw 0.9 processing 0.0)
23
- writing hmms removed 30 genes from glfo (leaving v 7 d 5 j 3)
24
- (0.2 sec)
19
+ writing parameters to test/new-results/test/parameters/simu/sw (0.4 sec)
20
+ water time: 0.5 (ig-sw 0.5 processing 0.0)
21
+ writing hmms removed 35 genes from glfo (leaving v 2 d 1 j 2)
22
+ (0.1 sec)
25
23
  hmm
26
24
  reading output
27
- read 36 hmm output lines with 36 sequences in 36 events (0 failures)
28
- writing parameters to test/new-results/test/parameters/simu/hmm (0.7 sec)
29
- writing parameters to test/new-results/test/parameters/simu/true (0.6 sec)
30
- infra time: 1.4
31
- hmm step time: 1.8
32
- writing hmms removed 0 genes from glfo (leaving v 7 d 5 j 3)
33
- (0.2 sec)
34
- total time: 3.4
35
- annotate-new-simu partis annotate --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --plot-annotation-performance --is-simu --plotdir test/new-results/annotate-new-simu-annotation-performance --only-csv-plots --random-seed 1 --n-procs 10 --outfname test/new-results/annotate-new-simu.yaml
36
- annotating (with test/new-results/test/parameters/simu/hmm)
37
- smith-waterman
38
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
39
- reading sw results from test/new-results/test/parameters/simu/sw-cache.yaml
40
- info for 36 / 36 = 1.000 (removed: 0 failed, 0 duplicates [removed when cache file was written])
41
- kept 18 (0.500) unproductive
42
- plotting performance
43
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
44
- (0.0 sec)
45
- water time: 0.3
46
- hmm
47
- reading output
48
- read 36 hmm output lines with 36 sequences in 36 events (0 failures)
49
- plotting performance
50
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
51
- (0.0 sec)
52
- hmm step time: 0.4
53
- total time: 0.7
54
- multi-annotate-new-simu partis annotate --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --plot-annotation-performance --simultaneous-true-clonal-seqs --is-simu --plotdir test/new-results/multi-annotate-new-simu-annotation-performance --only-csv-plots --random-seed 1 --n-procs 10 --outfname test/new-results/multi-annotate-new-simu.yaml
55
- annotating (with test/new-results/test/parameters/simu/hmm)
56
- smith-waterman
57
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
58
- note: not running msa indel stuff for --simultaneous-true-clonal-seqs, so any families with shm indels within cdr3 will be split up before running the hmm. To fix this you'll either need to run set_msa_info() (which is fine and easy, but slow, and requires deciding whether to make sure to run parameter caching with the arg, or else rerun smith waterman with the msa indels
59
- reading sw results from test/new-results/test/parameters/simu/sw-cache.yaml
60
- info for 36 / 36 = 1.000 (removed: 0 failed, 0 duplicates [removed when cache file was written])
61
- kept 18 (0.500) unproductive
62
- plotting performance
63
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
64
- (0.0 sec)
65
- water time: 0.3
66
- hmm
67
- --simultaneous-true-clonal-seqs: grouping seqs according to true partition
68
- warning split apart 1 cluster that contained multiple cdr3 lengths (total clusters: 10 --> 11)
69
- cluster splits: 8 --> 7 1
70
- subcluster annotating 11 clusters with steps: (0.2s) (0.1s) plotting performance
71
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
72
- (0.0 sec)
73
-
74
- subcluster annotation time 0.3
75
- total time: 0.7
76
- partition-new-simu partis partition --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --plot-annotation-performance --max-ccf-fail-frac 0.10 --is-simu --persistent-cachefname test/new-results/cache-new-partition.csv --plotdir test/new-results/partition-new-simu-annotation-performance --only-csv-plots --no-partition-plots --random-seed 1 --n-procs 10 --outfname test/new-results/partition-new-simu.yaml
77
- partitioning (with test/new-results/test/parameters/simu/hmm)
78
- smith-waterman
79
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
80
- reading sw results from test/new-results/test/parameters/simu/sw-cache.yaml
81
- info for 36 / 36 = 1.000 (removed: 0 failed, 0 duplicates [removed when cache file was written])
82
- kept 18 (0.500) unproductive
83
- plotting performance
84
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
85
- (0.0 sec)
86
- water time: 0.3
87
- hmm
88
- --persistent-cachefname: using existing hmm cache file test/new-results/cache-new-partition.csv
89
- caching all 36 naive sequences (0.4s)
90
- collapsed 36 queries into 12 clusters with identical naive seqs (0.0 sec)
91
- 12 clusters with 10 procs (0.1s)
92
- 12 clusters with 7 procs (0.0s)
93
- 12 clusters with 5 procs (0.0s)
94
- 12 clusters with 3 procs (0.0s)
95
- 12 clusters with 2 procs (0.1s)
96
- 11 clusters with 1 proc (0.4s)
97
- partition loop time: 0.7
98
- getting annotations for final partition
99
- subcluster annotating 10 clusters with steps: (0.2s) (0.1s) (0.1s) plotting performance
100
- warning skipped annotation performance evaluation on 1 queries with different true and inferred net shm indel lengths: d8761c689a
101
- (0.0 sec)
102
-
103
- subcluster annotation time 0.4
104
- total time: 1.7
105
- seed-partition-new-simu partis partition --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --max-ccf-fail-frac 0.10 --is-simu --persistent-cachefname test/new-results/cache-new-partition.csv --seed-unique-id 8024ed1a22 --random-seed 1 --n-procs 10 --outfname test/new-results/seed-partition-new-simu.yaml
106
- partitioning (with test/new-results/test/parameters/simu/hmm)
107
- smith-waterman
108
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
109
- reading sw results from test/new-results/test/parameters/simu/sw-cache.yaml
110
- info for 36 / 36 = 1.000 (removed: 0 failed, 0 duplicates [removed when cache file was written])
111
- kept 18 (0.500) unproductive
112
- removed 25 / 36 = 0.69 sequences with cdr3 length different from seed sequence (leaving 11)
113
- water time: 0.0
114
- hmm
115
- --persistent-cachefname: using existing hmm cache file test/new-results/cache-new-partition.csv
116
- collapsed 11 queries into 2 clusters with identical naive seqs (0.0 sec)
117
- reducing n procs to number of clusters: 10 --> 2
118
- 2 clusters with 2 procs (0.0s)
119
- removed 0 sequences in unseeded clusters, split 2 seeded clusters into 11 singletons, and merged these into 2 clusters with identical naive seqs (0.0 sec)
120
- new n_procs 1 (initial seqs/proc: 5.50 new seqs/proc: 2.00
121
- 2 clusters with 1 proc (0.1s)
122
- partition loop time: 0.1
123
- getting annotations for final partition
124
- subcluster annotating 1 cluster with steps: (0.1s) (0.1s) (0.1s)
125
- subcluster annotation time 0.2
126
- seed cluster size in best partition: 11, excluding seed seq: 10
127
- total time: 0.4
128
- vsearch-partition-new-simu partis partition --dont-write-git-info --infname test/ref-results/test/simu.yaml --parameter-dir test/new-results/test/parameters/simu --sw-cachefname test/new-results/test/parameters/simu/sw-cache.yaml --naive-vsearch --is-simu --persistent-cachefname test/new-results/cache-new-partition.csv --random-seed 1 --n-procs 10 --outfname test/new-results/vsearch-partition-new-simu.yaml
129
- partitioning (with test/new-results/test/parameters/simu/hmm)
130
- smith-waterman
131
- vsearch: 36 / 36 v annotations (0 failed) with 7 v genes in 0.0 sec
132
- reading sw results from test/new-results/test/parameters/simu/sw-cache.yaml
133
- info for 36 / 36 = 1.000 (removed: 0 failed, 0 duplicates [removed when cache file was written])
134
- kept 18 (0.500) unproductive
135
- water time: 0.0
136
- hmm
137
- --persistent-cachefname: using existing hmm cache file test/new-results/cache-new-partition.csv
138
- collapsed 36 sequences (36 initial naive seqs/clusters) into 12 unique naive sequences over 9 cdr3 lengths (0.0 sec)
139
- using hfrac bound for vsearch 0.013
140
- running vsearch 9 times (once for each cdr3 length class): . . . . . . . . .
141
- vsearch time: 0.1
142
- getting annotations for final partition
143
- calculating hmm annotations even though --fast/--naive-vsearch was set (you can set --use-sw-annotations to get faster (but substantially less accurate) annotations, or set --dont-calculate-annotations if you only need the partition)
144
- subcluster annotating 10 clusters with steps: (0.2s) (0.1s) (0.1s)
145
- subcluster annotation time 0.4
146
- total time: 0.5
147
- get-selection-metrics-new-simu partis get-selection-metrics --dont-write-git-info --existing-output-run-cfg paired --min-selection-metric-cluster-size 3 --min-paired-cluster-size-to-read 3 --random-seed 1 --n-procs 10 --outfname test/new-results/partition-new-simu.yaml --selection-metric-fname test/new-results/get-selection-metrics-new-simu.yaml
148
- note: --parameter-dir not set, so using default: x-dummy-x
149
- note: By default we print/operate on *all* annotations in the output file, which in general can include annotations from non-best partititons and non-seed clusters (e.g. if --n-final-clusters was set).
150
- If you want to restrict to particular annotations, use one of --only-print-best-partition, --only-print-seed-clusters, or --only-print-queries-to-include-clusters (or, if set during partitioning, --n-final-clusters or --min-largest-cluster-size).
151
- getting selection metrics (lbi lbr aa-lbi aa-lbr cons-dist-aa) with inferred lines: 4 clusters with sizes 11 7 7 3
152
- skipped 6 smaller than 3 (controlled by --min-selection-metric-cluster-size)
153
- getting trees for 3 clusters with sizes: 11 7 7
154
- all fasttree outputs exist, not rerunning (e.g. /home/dralph/work/partis/test/new-results/partition-new-simu/fasttree/iclust-0/fasttree.out)
155
- tree origins: 3 ran fasttree
156
- skipped 1/4 clusters smaller than 4
157
- setting default tau to 1 / 352 = 0.0028
158
- calculating normalized lb index and lb ratio and lb fraction with tau 0.0028
159
- warning get_aa_tree() (AA inf tree, iclust 0): skipped 13/18 edges for which we didn't have sequences for both nodes (i.e. left the original branch length unmodified). Missing nodes: amz bev bnw bop dkn ikm
160
- setting default tau to 1 / 352 = 0.0028
161
- calculating normalized lb index and lb ratio and lb fraction on aa tree with tau 0.0028
162
- iclust 1: warning tree depth and mfreq differ by more than 25% for 2/7 nodes (note that this is expected if these are single chain sequences being compared to a paired h+l tree)
163
- mean values: tree depth 0.001 mfreq 0.001 diff 0.000 abs(frac diff) 25% ratio 1.3
164
- 10 with highest abs(diff):
165
- tree depth mfreq ratio diff
166
- 0.0034 0.0027 1.3 0.0007 20a0129b57
167
- 0.0034 0.0027 1.3 0.0007 97366cf0d8
168
- 10 with highest+lowest ratios:
169
- 0.0034 0.0027 1.3 0.0007 20a0129b57
170
- 0.0034 0.0027 1.3 0.0007 97366cf0d8
171
- 0.0034 0.0027 1.3 0.0007 20a0129b57
172
- 0.0034 0.0027 1.3 0.0007 97366cf0d8
173
- warning get_aa_tree() (AA inf tree, iclust 1): skipped 3/9 edges for which we didn't have sequences for both nodes (i.e. left the original branch length unmodified). Missing nodes: eov
174
- warning get_aa_tree() (AA inf tree, iclust 2): skipped 11/13 edges for which we didn't have sequences for both nodes (i.e. left the original branch length unmodified). Missing nodes: apr dhq fnv nox uvx
175
- skipped 1/4 clusters that had no uids in common with tree
176
- writing selection metrics to test/new-results/get-selection-metrics-new-simu.yaml
177
- total time: 0.1
178
- cache-parameters-data partis cache-parameters --dont-write-git-info --infname test/mishmash.fa --parameter-dir test/new-results/test/parameters/data --sw-cachefname test/new-results/test/parameters/data/sw-cache.yaml --n-max-queries 50 --input-metafnames test/input-meta.yaml --random-seed 1 --n-procs 10
179
- stopped after reading 50 sequences from test/mishmash.fa
180
- --n-max-queries: stopped after reading 50 queries from input file
181
- --input-metafnames: added meta info for 4 sequences from test/input-meta.yaml: multiplicities
182
- caching parameters
183
- vsearch: 44 / 50 v annotations (6 failed) with 54 v genes in 0.0 sec
184
- keeping 24 / 198 v genes
185
- smith-waterman (new-allele fitting)
186
- vsearch: 45 / 50 v annotations (5 failed) with 23 v genes in 0.0 sec
187
- removing old sw cache test/new-results/test/parameters/data/sw-cache.yaml
188
- running 10 procs for 50 seqs
189
- running 12 procs for 5 seqs
190
- info for 46 / 50 = 0.920 (removed: 4 failed)
191
- kept 16 (0.320) unproductive
192
- water time: 0.1 (ig-sw 0.0 processing 0.0)
193
- smith-waterman (writing parameters)
194
- vsearch: 45 / 50 v annotations (5 failed) with 23 v genes in 0.0 sec
195
- running 10 procs for 46 seqs
196
- running 11 procs for 1 seq
197
- info for 46 / 50 = 0.920 (removed: 4 failed)
198
- kept 16 (0.320) unproductive
199
- writing sw results to test/new-results/test/parameters/data/sw-cache.yaml
200
- writing parameters to test/new-results/test/parameters/data/sw (1.0 sec)
201
- water time: 1.2 (ig-sw 1.1 processing 0.0)
202
- writing hmms removed 15 genes from glfo (leaving v 18 d 22 j 7)
203
- (0.4 sec)
204
- hmm
205
- reading output
206
- read 46 hmm output lines with 46 sequences in 46 events (0 failures)
207
- writing parameters to test/new-results/test/parameters/data/hmm (0.8 sec)
208
- infra time: 0.9
209
- hmm step time: 1.8
210
- writing hmms removed 6 genes from glfo (leaving v 15 d 19 j 7)
211
- (0.4 sec)
212
- total time: 4.1
213
- simulate partis simulate --dont-write-git-info --parameter-dir test/new-results/test/parameters/data --n-sim-events 10 --n-trees 10 --n-leaf-distribution geometric --n-leaves 5 --random-seed 1 --n-procs 10 --outfname test/new-results/test/simu.yaml --indel-frequency 0.2
214
- simulating
215
- Traceback (most recent call last):
216
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 1874, in <module>
217
-  args.func(args)
218
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 195, in run_simulation
219
-  cmdfos = run_sub_cmds(working_gldir)
220
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 120, in run_sub_cmds
221
-  utils.run_cmds(cmdfos, batch_system=args.batch_system, batch_options=args.batch_options, batch_config_fname=args.batch_config_fname, debug='print')
222
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/utils.py", line 5510, in run_cmds
223
-  status, dbgstrs[iproc] = finish_process(iproc, procs, n_tries_list[iproc], cmdfos[iproc], n_max_tries, dbgfo=cmdfos[iproc].get('dbgfo'), batch_system=batch_system, debug=debug, ignore_stderr=ignore_stderr, clean_on_success=clean_on_success, allow_failure=allow_failure)
224
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/utils.py", line 5630, in finish_process
225
-  raise Exception(failstr)
226
- Exception: exceeded max number of tries (1 >= 1) for subprocess with command:
227
- partis simulate --dont-write-git-info --parameter-dir test/new-results/test/parameters/data --n-sim-events 1 --n-trees 10 --n-leaf-distribution geometric --n-leaves 5 --random-seed 1 --n-procs 1 --outfname /tmp/dralph/hmms/852975/sub-0/simu.yaml --indel-frequency 0.2 --im-a-subproc --workdir /tmp/dralph/hmms/852975/sub-0
228
- stdout: /tmp/dralph/hmms/852975/log-0/out
229
- reco params: test/new-results/test/parameters/data/hmm shm params: test/new-results/test/parameters/data/hmm
230
-
231
- stderr: /tmp/dralph/hmms/852975/log-0/err
232
- Traceback (most recent call last):
233
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/utils.py", line 5228, in check_cmd
234
-  subprocess.check_call([cmd] + options, stdout=open('/dev/null'))
235
- File "/usr/lib/python3.10/subprocess.py", line 364, in check_call
236
-  retcode = call(*popenargs, **kwargs)
237
- File "/usr/lib/python3.10/subprocess.py", line 345, in call
238
-  with Popen(*popenargs, **kwargs) as p:
239
- File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
240
-  self._execute_child(args, executable, preexec_fn, close_fds,
241
- File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
242
-  raise child_exception_type(errno_num, err_msg, err_filename)
243
- FileNotFoundError: [Errno 2] No such file or directory: 'R'
244
- 
245
- During handling of the above exception, another exception occurred:
246
-
247
- Traceback (most recent call last):
248
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 1874, in <module>
249
-  args.func(args)
250
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 193, in run_simulation
251
-  make_events(args.n_sim_events, args.workdir, args.outfname, [random.randint(0, numpy.iinfo(numpy.int32).max) for _ in range(args.n_sim_events)], heavy_chain_events=heavy_chain_events)
252
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/bin/partis", line 177, in make_events
253
-  reco = Recombinator(args, glfo, seed=args.random_seed, workdir=workdir, heavy_chain_events=heavy_chain_events)
254
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/recombinator.py", line 78, in __init__
255
-  treegen.generate_trees(seed, self.treefname, self.workdir)
256
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/treegenerator.py", line 257, in generate_trees
257
-  ages, treestrs = self.run_treesim(seed, outfname, workdir)
258
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/treegenerator.py", line 205, in run_treesim
259
-  utils.run_r(cmd_lines, workdir, print_time='tree generation' if self.args.debug else None, remove_cmdfile=True)
260
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/utils.py", line 5248, in run_r
261
-  check_cmd('R', options=['--slave', '--version'])
262
- File "/home/dralph/.local/pipx/venvs/partis-bcr/lib/python3.10/site-packages/python/utils.py", line 5235, in check_cmd
263
-  raise Exception('command \'%s\' not found in path (maybe not installed?)' % cmd)
264
- Exception: command 'R' not found in path (maybe not installed?)
265
-
25
+ read 10 hmm output lines with 10 sequences in 10 events (0 failures)
26
+ writing parameters to test/new-results/test/parameters/simu/hmm (0.2 sec)
27
+ infra time: 0.2
28
+ hmm step time: 0.3
29
+ writing hmms removed 0 genes from glfo (leaving v 2 d 1 j 2)
30
+ (0.1 sec)
31
+ total time: 1.2
test/test.py CHANGED
@@ -33,7 +33,10 @@ class Tester(object):
33
33
  # ----------------------------------------------------------------------------------------
34
34
  def dirs(self, tstr, force_paired=False):
35
35
  assert tstr in ['ref', 'new']
36
- return 'test%s/%s-results%s' % ('/paired' if (args.paired or force_paired) else '', tstr, '-slow' if args.slow else '')
36
+ bdir = 'test%s' % ('/paired' if (args.paired or force_paired) else '')
37
+ if not os.path.exists(bdir):
38
+ bdir = '%s/%s' % (utils.get_partis_dir(), bdir)
39
+ return '%s/%s-results%s' % (bdir, tstr, '-slow' if args.slow else '')
37
40
  # ----------------------------------------------------------------------------------------
38
41
  def nqr(self, act):
39
42
  if act == 'quick': # bears no relation to the others, so makes sense to handle it differently
bin/partis-pip DELETED
@@ -1,116 +0,0 @@
1
- #!/usr/bin/env python3
2
- from __future__ import absolute_import, division, unicode_literals
3
- from __future__ import print_function
4
- import argparse
5
- import copy
6
- import time
7
- import random
8
- import sys
9
- import subprocess
10
- # import multiprocessing
11
- import numpy
12
- import scipy
13
- import math
14
- import itertools
15
- import collections
16
- import traceback
17
- from io import open
18
- import colored_traceback.always
19
- import os
20
- import json
21
- import csv
22
- import operator
23
- import glob
24
- from collections import defaultdict
25
-
26
- # Auto-detect installation type and set up imports accordingly
27
- def setup_partis_environment():
28
- # Check if we're in a pip installation or source installation
29
- current_dir = os.path.dirname(os.path.realpath(__file__))
30
-
31
- # Try to detect pip installation structure
32
- if current_dir.endswith('/site-packages/bin'):
33
- # We're in a pip installation: /site-packages/bin/partis
34
- site_packages_dir = os.path.dirname(current_dir) # /site-packages
35
- partis_dir = site_packages_dir
36
-
37
- # Set up environment for pip installation
38
- os.environ['PARTIS_DIR'] = partis_dir
39
- sys.path.insert(1, site_packages_dir)
40
-
41
- # Import using pip package structure
42
- import partis.utils as utils
43
- import partis.glutils as glutils
44
- import partis.treeutils as treeutils
45
- import partis.processargs as processargs
46
- import partis.seqfileopener as seqfileopener
47
- from partis.partitiondriver import PartitionDriver
48
- from partis.clusterpath import ClusterPath
49
- import partis.paircluster as paircluster
50
- from partis.parametercounter import ParameterCounter
51
- from partis.corrcounter import CorrCounter
52
- from partis.waterer import Waterer
53
-
54
- return utils, glutils, treeutils, processargs, seqfileopener, PartitionDriver, ClusterPath, paircluster, ParameterCounter, CorrCounter, Waterer, partis_dir
55
-
56
- else:
57
- # We're in a source installation: assume standard partis directory structure
58
- partis_dir = os.path.dirname(os.path.realpath(__file__)).replace('/bin', '')
59
- if not os.path.exists(partis_dir):
60
- print('%s partis dir %s doesn\'t exist, so python path may not be correctly set' % (os.path.dirname(os.path.realpath(__file__)), partis_dir))
61
- sys.path.insert(1, partis_dir)
62
-
63
- # Set up environment for source installation
64
- os.environ['PARTIS_DIR'] = partis_dir
65
-
66
- # Import using source structure
67
- import python.utils as utils
68
- import python.glutils as glutils
69
- import python.treeutils as treeutils
70
- import python.processargs as processargs
71
- import python.seqfileopener as seqfileopener
72
- from python.partitiondriver import PartitionDriver
73
- from python.clusterpath import ClusterPath
74
- import python.paircluster as paircluster
75
- from python.parametercounter import ParameterCounter
76
- from python.corrcounter import CorrCounter
77
- from python.waterer import Waterer
78
-
79
- return utils, glutils, treeutils, processargs, seqfileopener, PartitionDriver, ClusterPath, paircluster, ParameterCounter, CorrCounter, Waterer, partis_dir
80
-
81
- # Initialize environment and imports
82
- utils, glutils, treeutils, processargs, seqfileopener, PartitionDriver, ClusterPath, paircluster, ParameterCounter, CorrCounter, Waterer, partis_dir = setup_partis_environment()
83
-
84
- # ----------------------------------------------------------------------------------------
85
- def run_simulation(args):
86
- # ----------------------------------------------------------------------------------------
87
- def run_sub_cmds(working_gldir):
88
- # ----------------------------------------------------------------------------------------
89
- def get_sub_events(iproc):
90
- n_sub_events = args.n_sim_events // args.n_procs
91
- if iproc == args.n_procs - 1 and args.n_sim_events % args.n_procs > 0: # do any extra ones in the last proc (has to match sub file writer below)
92
- n_sub_events += args.n_sim_events % args.n_procs
93
- n_per_proc_list.append(n_sub_events)
94
- return n_sub_events
95
- # ----------------------------------------------------------------------------------------
96
- def get_workdir(iproc):
97
- return utils.choose_random_subdir('/tmp') + '/partis-simu-' + str(random.randint(0, 999999))
98
- # ----------------------------------------------------------------------------------------
99
- if args.n_procs == 1:
100
- sub_cmds = [get_simulation_cmd(working_gldir, n_events=args.n_sim_events, random_seed=random.randint(0, 999999), outfname=args.outfname, workdir=None)]
101
- else:
102
- n_per_proc_list = []
103
- sub_cmds = []
104
- for iproc in range(args.n_procs):
105
- workdir = get_workdir(iproc)
106
- outfname = workdir + '/simu-' + str(iproc) + '.yaml'
107
- sub_cmds.append(get_simulation_cmd(working_gldir, n_events=get_sub_events(iproc), random_seed=random.randint(0, 999999), outfname=outfname, workdir=workdir))
108
-
109
- utils.run_cmds(sub_cmds, shell=True, n_max_procs=args.n_procs, sleep=False, debug=args.debug, proc_limit_str=' %d / %d ' % (len(sub_cmds), len(sub_cmds)))
110
-
111
- if args.n_procs > 1:
112
- merge_simulation_outputs(sub_cmds)
113
-
114
- # ... rest of the simulation code would continue here, but for brevity I'll skip to the main parts
115
-
116
- # Copy the rest of the original bin/partis file content here, but I'll jump to the main execution part