Open Wytamma opened 2 years ago
Turns out the hooks for modifying the report are quite limited for stylistic things. You can do some pretty advanced stuff with modifying the tables, doing queries on the results that end up in there etc. But I had to do some css trickery to get the logo in there. I see the following options going forward:
Option 1 is the easiest, 3 means we can make it look nice but future changes to phytest-html upstream may break the post-processing occasionally, 2 is a lot more work.
I vote option 3 for the moment...
Hmm yeah 2 and 3 seem like a lot of work... I think it depends on what we want to add. For example we can use the biopython.Phylo.draw method to draw trees and colour the tips red/green if the fail/pass the tests https://github.com/biopython/biopython/blob/master/Bio/Phylo/_utils.py#L242. I don't think that would be too hard to add with option 1 would just be similar to the logo I think? We could also add the root-to-tip regression plot to the report in the same manner. We might have to base64 encode the images to keep the report self contained though.
Actually I don't know if colouring the tree would work because It'd depend on the tip names being the same as the sequence IDs. But we could still include a tree for visualisation?
Currently the Phytest report is pretty bland, but we could customise it to include a MSA and Tree for better interpretation https://pytest-html.readthedocs.io/en/latest/user_guide.html