wells-wood-research / de-stress

DE-STRESS is a model evaluation pipeline that aims to make protein design more reliable and accessible.
http://destressprotein.design
18 stars 1 forks source link

Data export and dependency bundling #38

Closed ChrisWellsWood closed 3 years ago

ChrisWellsWood commented 3 years ago

This adds a button in the control panel of the designs page that enables export of design metrics to a csv file. There are three major parts to this PR:

  1. The Elm code that generates the CSV file
  2. Addition of the FileSaver.js dependency and associated port for writing files
  3. Bundling of dependencies using WebPack

We have got to a point with JS dependencies that it makes sense to bundle everything together and serve it as a blob rather than fetching js from remote servers. It helps us keep track of versions and stops there being problems if the cdn server is down. This does have a downside though, we're server 800 KB of JS with our application, which will slow down the initial page load. In future we could fix this with lazy loading in WebPack, or remove vega-lite as a dependency, as it's the bulk of the payload.

Closes #22.

ChrisWellsWood commented 3 years ago

I'm converting this back to a draft until #39 is merged in, then I'll update this branch to include Dfire in the data export.

MichaelJamesStam commented 3 years ago

Looks really good! I manged to export some data out as a csv file. I noticed that there were three fields missing from the EvoEF2 output - amino acid propensity, dunbrack and ramanchadran energy. These three fields combined with the other sub totals will add up to the total EvoEF2 energy.

ChrisWellsWood commented 3 years ago

@MichaelJamesStam, this is good to go once you've added your review. I've added DFIRE to the export output. One thing to note: I have changed the name of the DFIRE path in the .env from BINARY to FOLDER. I originally included the path directly to calene and this threw and error because calene is appended to the path in the code so it ended up being calenecalene.

MichaelJamesStam commented 3 years ago

Looks really good! I managed to export data for loads of different PDB files and the dfire energy values were there. I updated the path in my .env file as well. I think there are still 3 EvoEF total fields that are missing though - amino acid propensity, dunbrack and ramanchadran energy.

ChrisWellsWood commented 3 years ago

@MichaelJamesStam, that's me added those missing fields. Once you've added your review, merge and delete the branch if you think it's ready.