Closed mhkc closed 10 months ago
Confirmed that cgMLST clustering works. One issue though: sample metadata does not reach grapetree:
Confirmed that admin user can create/edit groups
Confirmed that comments can be added/removed from sample
minhash clustering works with no sample metadata loss when loading into grapetree
mlst clustering works when clustering all 15 samples, but seems to suffer from the same sample metadata loss as cgMLST clustering.
also the clustering fails when trying to cluster lower nbr of samples:
for example sending the following samples to mlst clustering:
19NG0500446_S9
19NG0500446_S2
19NG0500481_S1
19NG0500540
19NG0500538_S4
19NG0500586
19NG0500634
19NG0500471_S3
19NG0500546
19NG0500538_S12
leads to the following error in the api logs, with its source in the allele_cluster_service
INFO: 172.18.0.1:36132 - "POST /cluster/mlst/ HTTP/1.1" 201 Created
INFO: 172.18.0.1:36138 - "GET /job/status/7c329e42-9337-47c8-bb10-8f446390e8c3 HTTP/1.1" 200 OK
[2023-12-21 08:58:45,626] WARNING in queue: Redis job JobStatusCodes.FAILED; Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/rq/worker.py", line 1428, in perform_job
rv = job.perform()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1278, in perform
self._result = self._execute()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1315, in _execute
result = self.func(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/worker/app/allele_cluster_service/tasks.py", line 27, in cluster
newick = backend(profile=profile, method=method.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/worker/app/allele_cluster_service/ms_trees.py", line 1147, in backend
tre = eval("methods." + params["method"])(names, profiles, embeded, **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/worker/app/allele_cluster_service/ms_trees.py", line 726, in MSTree
tree = methods._network2tree(tree, names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/worker/app/allele_cluster_service/ms_trees.py", line 667, in _network2tree
in_use = {branches[0][0]: 1}
~~~~~~~~^^^
IndexError: list index out of range
INFO: 172.18.0.1:36138 - "GET /job/status/7c329e42-9337-47c8-bb10-8f446390e8c3 HTTP/1.1" 200 OK
if it's an expected failure due to a too low nbr of samples, then a suggestion for a future update is to berate user for their poor choices w/ informative error message (right now it just says that clustering failed w/o elaborating)
sample results are displayed and look great!
one suggestion though (for a future update) might be to improve some of the tables (like the ones below) which are a bit crowded:
Quick suggestions could be to (if possible):
for comparison the variants table looks good:
mlst clustering works when clustering all 15 samples, but seems to suffer from the same sample metadata loss as cgMLST clustering.
also the clustering fails when trying to cluster lower nbr of samples:
for example sending the following samples to mlst clustering:
19NG0500446_S9 19NG0500446_S2 19NG0500481_S1 19NG0500540 19NG0500538_S4 19NG0500586 19NG0500634 19NG0500471_S3 19NG0500546 19NG0500538_S12
leads to the following error in the api logs, with its source in the
allele_cluster_service
INFO: 172.18.0.1:36132 - "POST /cluster/mlst/ HTTP/1.1" 201 Created INFO: 172.18.0.1:36138 - "GET /job/status/7c329e42-9337-47c8-bb10-8f446390e8c3 HTTP/1.1" 200 OK [2023-12-21 08:58:45,626] WARNING in queue: Redis job JobStatusCodes.FAILED; Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/rq/worker.py", line 1428, in perform_job rv = job.perform() ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1278, in perform self._result = self._execute() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1315, in _execute result = self.func(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/worker/app/allele_cluster_service/tasks.py", line 27, in cluster newick = backend(profile=profile, method=method.value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/worker/app/allele_cluster_service/ms_trees.py", line 1147, in backend tre = eval("methods." + params["method"])(names, profiles, embeded, **params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/worker/app/allele_cluster_service/ms_trees.py", line 726, in MSTree tree = methods._network2tree(tree, names) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/worker/app/allele_cluster_service/ms_trees.py", line 667, in _network2tree in_use = {branches[0][0]: 1} ~~~~~~~~^^^ IndexError: list index out of range INFO: 172.18.0.1:36138 - "GET /job/status/7c329e42-9337-47c8-bb10-8f446390e8c3 HTTP/1.1" 200 OK
if it's an expected failure due to a too low nbr of samples, then a suggestion for a future update is to berate user for their poor choices w/ informative error message (right now it just says that clustering failed w/o elaborating)
I bug in GrapeTree. Seem to be caused when all MLST alleles are the same.
https://github.com/Clinical-Genomics-Lund/bonsai/pull/109#issuecomment-1865825479
This is now fixed in master
This PR is the first beta release of Bonsai. This release is compatible with JASEN v0.3.0.
Tests