psathyrella / partis

B- and T-cell receptor sequence annotation, simulation, clonal family and germline inference, and affinity prediction
GNU General Public License v3.0
54 stars 36 forks source link

Crash when using get-tree-metrics on output of partis partition run. #300

Closed wfs-lilly closed 4 years ago

wfs-lilly commented 4 years ago

Output and stack trace:

Singularity partis_latest.sif:~/v5x3838/linearham> /partis/bin/partis get-tree-metrics --outfname ./TSPN-m6-dedup2.part.yaml --plotdir ./plots --cluster-indices 0:5
getting tree metrics
    calculating tree metrics for 1818 clusters with sizes: 1749 1275 1257 1127 1075 744 740 706 705 594 572 569 555 546 515 486 467 452 446 437 423 404 403 391 388 381 375 375 375 372 368 353 343 339 316 316 311 307 302 300 297 297 294 294 294 287 285 284 284 279 274 274 272 268 265 262 262 262 259 256 244 244 243 240 238 238 227 227 225 225 223 218 218 217 216 215 208 207 206 203 201 200 199 195 194 191 189 189 188 185 185 182 182 180 177 177 177 176 176 176 175 174 174 173 172 172 171 171 169 169 166 166 165 165 164 163 163 162 162 160 159 159 158 156 156 155 155 154 154 153 151 151 150 145 144 143 143 143 142 140 139 139 137 137 136 135 134 133 133 132 132 131 131 131 130 129 126 126 126 125 125 125 123 122 122 121 121 120 120 120 120 120 118 118 117 117 117 116 116 115 115 115 114 114 112 112 112 112 112 112 112 111 110 110 109 109 108 108 107 107 106 106 105 104 104 103 103 103 102 102 101 101 101 101 99 99 99 98 98 97 97 96 96 96 96 96 96 96 95 95 95 95 94 94 94 93 93 92 92 92 91 91 91 90 90 90 90 89 89 88 88 88 88 87 87 86 85 85 83 83 83 83 82 82 82 82 82 82 81 81 81 81 81 81 80 79 79 79 79 78 78 78 78 77 77 77 77 77 77 76 76 76 76 76 75 75 75 75 75 75 75 75 74 74 74 74 74 73 73 73 72 72 72 71 71 71 71 71 71 71 70 70 70 70 70 69 69 69 69 69 69 68 68 68 68 68 68 67 67 67 67 67 67 67 67 67 67 66 66 65 65 65 65 65 65 64 64 64 64 64 64 64 64 64 64 64 63 63 63 62 62 62 62 61 61 61 60 60 60 60 60 60 60 59 59 59 59 59 59 58 58 58 58 58 58 58 58 58 58 58 57 57 57 57 57 57 57 57 57 56 56 56 56 56 56 56 56 55 55 55 55 55 55 55 54 54 54 54 54 54 54 54 54 53 53 53 53 53 53 53 53 53 53 53 52 52 52 52 52 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 50 50 50 50 50 50 50 50 50 50 50 50 50 49 49 49 49 49 49 49 48 48 48 48 48 48 48 48 48 47 47 47 47 47 47 47 47 47 47 46 46 46 46 46 46 46 46 45 45 45 45 45 45 45 45 44 44 44 44 44 44 44 44 44 44 43 43 43 43 43 43 43 43 43 43 43 43 42 42 42 42 42 42 42 42 42 42 41 41 41 41 41 41 41 41 41 41 41 41 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 37 37 37 37 37 37 37 37 37 37 37 36 36 36 36 36 36 36 36 36 36 36 36 36 36 35 35 35 35 35 35 35 35 35 35 35 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 30 30 30 30 30 30 30 30 30 30 30 30 30 30 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
      skipping 18235 smaller than 10
Traceback (most recent call last):
  File "/partis/bin/partis", line 472, in <module>
    args.func(args)
  File "/partis/bin/partis", line 217, in run_partitiondriver
    parter.run(actions)
  File "/partis/python/partitiondriver.py", line 120, in run
    self.action_fcns[tmpaction]()
  File "/partis/python/partitiondriver.py", line 478, in read_existing_output
    self.calc_tree_metrics(annotation_dict, annotation_list=annotation_list, cpath=cpath)  # adds tree metrics to <annotations>
  File "/partis/python/partitiondriver.py", line 320, in calc_tree_metrics
    only_csv=self.args.only_csv_plots, debug=self.args.debug)
  File "/partis/python/treeutils.py", line 1123, in calculate_tree_metrics
    treefo = get_tree_for_line(line, treefname=treefname, cpath=cpath, annotations=annotations, use_true_clusters=use_true_clusters, debug=debug)
  File "/partis/python/treeutils.py", line 1080, in get_tree_for_line
    cpath.make_trees(annotations=annotations, i_only_cluster=i_only_cluster, get_fasttrees=True, debug=False)
  File "/partis/python/clusterpath.py", line 574, in make_trees
    self.trees[i_cluster] = self.make_single_tree(sub_partitions, sub_annotations, uid_set, naive_seq_name, get_fasttrees=get_fasttrees, debug=debug)
  File "/partis/python/clusterpath.py", line 423, in make_single_tree
    dtree = dendropy.Tree(taxon_namespace=tns, seed_node=root_node, is_rooted=True)
  File "/opt/conda/lib/python2.7/site-packages/dendropy/datamodel/treemodel.py", line 3039, in __init__
    raise TypeError("Unrecognized or unsupported arguments: {}".format(kwargs))
TypeError: Unrecognized or unsupported arguments: {'is_rooted': True}

[edited to add code quoting by DR]

psathyrella commented 4 years ago

That looks like almost certainly a version issue. I'll try to track down when dendropy added the is_rooted argument. What version are you using?

wfs-lilly commented 4 years ago

Looks like version 4.0.0. It’s whatever is in the partis docker image.

Singularity partis_latest.sif:/partis> ipython Python 2.7.17 |Anaconda, Inc.| (default, Oct 21 2019, 19:04:46) Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.

In [1]: import dendropy

In [2]: dendropy.version Out[2]: '4.0.0'

William F. Smith Bioinformatician BCforward Lilly Biotechnology Center 10290 Campus Point Dr. San Diego, CA 92121 smith_william1@network.lilly.commailto:smith_william1@network.lilly.com

CONFIDENTIALITY NOTICE: This email message (including all attachments) is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

psathyrella commented 4 years ago

Cool, also nice catch. We didn't catch this cause get-tree-metrics is not in the regular testing procedure, but this requires dendropy 4.4.0. I've updated the Dockerfile here.

wfs-lilly commented 4 years ago

Very good – thanks. Does DockerHub automatically trigger a rebuild when there is a Github change?

William F. Smith Bioinformatician BCforward Lilly Biotechnology Center 10290 Campus Point Dr. San Diego, CA 92121 smith_william1@network.lilly.commailto:smith_william1@network.lilly.com

CONFIDENTIALITY NOTICE: This email message (including all attachments) is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

From: Duncan Ralph notifications@github.com Sent: Friday, November 15, 2019 12:49 PM To: psathyrella/partis partis@noreply.github.com Cc: William Smith - Network smith_william1@network.lilly.com; Author author@noreply.github.com Subject: [EXTERNAL] Re: [psathyrella/partis] Crash when using get-tree-metrics on output of partis partition run. (#300)

EXTERNAL EMAIL: Use caution before replying, clicking links, and opening attachments.

Cool, also nice catch. We didn't catch this cause get-tree-metrics is not in the regular testing procedure, but this requires dendropy 4.4.0. I've updated the Dockerfile herehttps://github.com/psathyrella/partis/commit/b5c944627879e03b10a42af9d13ea9333368cde2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/psathyrella/partis/issues/300?email_source=notifications&email_token=ANU5HJX2AA3XFLT4CXHK2K3QT4DMLA5CNFSM4JNUYLB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGVRMY#issuecomment-554522803, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANU5HJUTCQOFJD2QAYLVTO3QT4DMLANCNFSM4JNUYLBQ.

psathyrella commented 4 years ago

Yeah, when the change is pushed to master, which it was. You can check the builds here, and it has a link there to the github source commit.