TRON-Bioinformatics / covigator

CoVigator - Monitoring SARS-CoV-2 mutations
MIT License
11 stars 1 forks source link

61 annotate lineages with names #101

Closed johausmann closed 1 year ago

johausmann commented 1 year ago

Related to #61

This merge request adds the lineage annotations based on the constellation files from scorpio.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.45 :tada:

Comparison is base (2a5f11b) 83.17% compared to head (8959fdb) 83.63%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #101 +/- ## =========================================== + Coverage 83.17% 83.63% +0.45% =========================================== Files 46 47 +1 Lines 4238 4357 +119 =========================================== + Hits 3525 3644 +119 Misses 713 713 ``` | [Impacted Files](https://codecov.io/gh/TRON-Bioinformatics/covigator/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics) | Coverage Δ | | |---|---|---| | [covigator/database/database.py](https://codecov.io/gh/TRON-Bioinformatics/covigator/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics#diff-Y292aWdhdG9yL2RhdGFiYXNlL2RhdGFiYXNlLnB5) | `64.06% <100.00%> (+1.76%)` | :arrow_up: | | [covigator/database/model.py](https://codecov.io/gh/TRON-Bioinformatics/covigator/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics#diff-Y292aWdhdG9yL2RhdGFiYXNlL21vZGVsLnB5) | `98.78% <100.00%> (+0.02%)` | :arrow_up: | | [covigator/references/lineage\_annotation.py](https://codecov.io/gh/TRON-Bioinformatics/covigator/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics#diff-Y292aWdhdG9yL3JlZmVyZW5jZXMvbGluZWFnZV9hbm5vdGF0aW9uLnB5) | `100.00% <100.00%> (ø)` | | | [...r/tests/unit\_tests/test\_database\_initialisation.py](https://codecov.io/gh/TRON-Bioinformatics/covigator/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics#diff-Y292aWdhdG9yL3Rlc3RzL3VuaXRfdGVzdHMvdGVzdF9kYXRhYmFzZV9pbml0aWFsaXNhdGlvbi5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TRON-Bioinformatics)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

priesgo commented 1 year ago

There are a couple of codacy style issues referring to an usused import from sqlalchemy.orm import relationship. But you will use this soon so... In any case, checkout codacy, sometimes provides useful info.

priesgo commented 1 year ago

There is something about adding FKs that may need explanation or maybe not, but just in case here it goes.

If you add an FK to the model in an existing table when you create the database from scratch it will work just fine, but if you have an existing DB (as our development DB or our production DB) you will actually need to alter the database manually to add the FK. I have been adding these DB patches under scripts/sql, you basically need an alter SQL script that does the trick. Be careful you may break the DB, but if you do break it we have backup in any case.