veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
201 stars 68 forks source link

Result visualization error #1592

Closed Caiguoyu closed 11 months ago

Caiguoyu commented 1 year ago

I would like to ask,after I finished calculating aBSREL,I imported visualization on the official website,the result showed 'Ouch! Something went wrong when rendering the results page. Please file a bug.'Why???

spond commented 1 year ago

Dear @Caiguoyu,

Does your JSON file load OK usign https://observablehq.com/@spond/displaying-absrel-results-using-branch-censoring? If so, there's probably a version incompatibility somewhere.

Would you mind sharing your JSON file with me for debugging purposes?

Best, Sergei

Caiguoyu commented 1 year ago

Dear @Caiguoyu,

Does your JSON file load OK usign https://observablehq.com/@spond/displaying-absrel-results-using-branch-censoring? If so, there's probably a version incompatibility somewhere.

Would you mind sharing your JSON file with me for debugging purposes?

Best, Sergei

Dear @spond I can share my JSON file with you,But the link(https://observablehq.com/@spond/displaying-absrel-results-using-branch-censoring) you shared with me above cannot be opened,My JSON files are directly generated by computing in Xshell. chai.PML.ABSREL.zip

bpetros95 commented 1 year ago

I am having similar difficulties with SLAC. My .json file looks fine. Appreciate any feedback.

hyphy_test_results.txt.zip

stevenweaver commented 1 year ago

Dear @bpetros95,

I was able to reproduce your issue.

@spond @stephenshank,

The error occurs at https://github.com/veg/hyphy-vision/blob/master/src/jsx/slac.jsx#L1171

TypeError: undefined is not an object (evaluating 't[e][n].codon[0]')

Best, Steven

stephenshank commented 1 year ago

A lot of the internal nodes only possess the Nucleotide GTR attribute, see below. They are missing the codon attribute that the aforementioned line expects, as well as the synonymous substitution count and nonsynonymous substitution count attributes expected a few lines below.

I'm not sure why that would be (note that runtime is 2.5.42), but if this is expected behavior from HyPhy I can accommodate.

Screenshot 2023-06-12 at 8 48 37 PM

spond commented 1 year ago

Dear all,

The SLAC JSON is expected to contain more than just the Nucleotide GTR (which seems to be confined to just one "abnormal" node record). There's something odd happening. @bpetros95 : could you please share your input file and run settings? I'ld like to check it with the current version.

Best, Sergei

bpetros95 commented 1 year ago

yep, ran it in hyphy v2.5.32, SLAC, universal genetic code, all branches, 100 ancestral state samples, 0.05 p-val inputs.zip

stephenshank commented 1 year ago

Dear @bpetros95,

I ran your dataset with HyPhy 2.5.50, which is our latest version available through bioconda. This issue actually persists, so I believe this might represent an interesting edge case. Thank you for sharing!

We'll discuss internally and follow up.

Regards, Stephen

bpetros95 commented 1 year ago

Exciting! Do let me know what you find or if you have visualization suggestions in the meantime.

Brittany

spond commented 1 year ago

Dear @bpetros95,

Add --kill-zero-lengths Constrain to your command line, and the resulting JSON should be viewable. I would also recommend pruning out duplicate sequences:

-------
>[WARNING] This dataset contains 1560 duplicate sequences. Identical
sequences do not contribute any information to the analysis and only
slow down computation. Please consider removing duplicate or 'nearly'
duplicate sequences, e.g. using
https://github.com/veg/hyphy-analyses/tree/master/remove-duplicates
prior to running selection analyses
-------

I'll investigate what happens with the default setting to cause the errors in JSON (it has to do with automatic removal of zero-length branches).

Best, Sergei

bpetros95 commented 1 year ago

Thanks, I have it running with the added argument and will let you know how it goes.

spond commented 1 year ago

Dear @bpetros95,

I looked into the issue a bit; I added some bug fixes to the next release. The issue stems from the fact that your input tree (output by NextStrain, looks like) has "single-child" internal nodes in the tree, e.g.

(KP317956_1:0):0.002579999999999999

HyPhy assumes that the input trees will be at least bifurcating, so each internal node has ≥2 children. While technically valid, single-child trees seem to be breaking some logic in the code in non-trivial ways. Let's keep this open until the next release. I need to confirm that my bug fixes deal with the underlying issue.

Best, Sergei

bpetros95 commented 1 year ago

confirmed that HyPhy viz works with --kill-zero-lengths Constrain added to the command. thank you!

github-actions[bot] commented 11 months ago

Stale issue message