TeselaGen / openVectorEditor

DEPRECATED - Teselagen's Open Source Vector/Plasmid Editor Component
https://teselagen.github.io/tg-oss/ove/#/Editor
MIT License
200 stars 72 forks source link

Added Translation and Amino Acid Molecular Mass #850

Closed djriffle closed 1 year ago

djriffle commented 1 year ago

connects https://github.com/TeselaGen/astar-support/issues/21

cypress[bot] commented 1 year ago



Test summary

240 0 1 0


Run details

Project openVectorEditor
Status Passed
Commit a756a31d3c
Started Jul 29, 2022 5:53 PM
Ended Jul 29, 2022 6:05 PM
Duration 11:50 💡
OS Linux Ubuntu - 20.04
Browser Electron 91

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] commented 1 year ago



Test summary

240 0 1 0


Run details

Project openVectorEditor
Status Passed
Commit b17df3eb41 ℹ️
Started Jul 28, 2022 9:11 PM
Ended Jul 28, 2022 9:26 PM
Duration 14:22 💡
OS Linux Ubuntu - 20.04
Browser Electron 91

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

codecov-commenter commented 1 year ago

Codecov Report

Merging #850 (8ccb719) into master (2951832) will decrease coverage by 0.02%. The diff coverage is 0.00%.

:exclamation: Current head 8ccb719 differs from pull request most recent head be6f868. Consider uploading reports for the commit be6f868 to get more accurate results

@@            Coverage Diff             @@
##           master     #850      +/-   ##
==========================================
- Coverage   74.73%   74.70%   -0.03%     
==========================================
  Files         271      271              
  Lines       10676    10680       +4     
  Branches     3813     3813              
==========================================
  Hits         7979     7979              
- Misses       2361     2365       +4     
  Partials      336      336              
Impacted Files Coverage Δ
src/RowItem/Translations/Translation.js 87.27% <ø> (ø)
...mponents/PropertiesDialog/TranslationProperties.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2951832...be6f868. Read the comment docs.

tnrich commented 1 year ago

@djriffle

image

I think we probably want to choose a level at which to round those guys

tnrich commented 1 year ago

@djriffle also let's remove this code and turn it into a helper function in ve-sequence-utils:

let translationMass = 0;
      for (let i = 0; i < translation.aminoAcids.length; i++) {
        translationMass +=
          proteinAlphabet[translation.aminoAcids[i].aminoAcid.value].mass;
      }
      translationMass /= 3; //this is because each amino acid is by nucleotide so it appear three times

I think something like getMassOfAaString would be a good name/function to have on hand since we'll want do this computation from other places as well. Sound good?