Commit 4451d34
fix!(prepro): Make host field curatable for INSDC-ingested sequences (#6499)
## BREAKING CHANGE
A prepro function has changed its name for clarity, please change
```
preprocessing:
function: validate_host
```
to:
```
preprocessing:
function: resolve_host_taxon_id
```
### Summary
For INSDC ingested sequences, we currently skip host validation and just
take the `hostTaxonId` as-is, if it's provided.
This was done because we did not want to overwrite INSDC-ingested
information during preprocessing, as it would be a type of curation. If
a hypothetical INSDC sequence has a `hostTaxonId` pointing to organism
A, but a scientific name pointing to organism B, our preprocessing would
overwrite this so both fields point to organism A. While this may be
correct, it would mean that this sequence looks different on our end
versus in INSDC.
However, we're now running into issues where we can't perform desired
curations on INSDC-ingested data, specifically for sequences where a
`hostNameScientific` is present but the `hostTaxonId` is missing. This
PR aims to correct this.
### PR Checklist
- [ ] All necessary documentation has been adapted.
- [ ] The implemented feature is covered by appropriate, automated
tests.
- [x] Any manual testing that has been done is documented (i.e. what
exactly was tested?)
I signed in as superuser and confirmed I could revise/curate a sequence
by editing the host field:
<img width="2958" height="692" alt="image"
src="https://github.com/user-attachments/assets/f2df1a02-614e-4385-b533-d983151ad65c"
/>
🚀 Preview: https://remove-insdc-special-case.loculus.org
---------
Co-authored-by: Anna (Anya) Parker <50943381+anna-parker@users.noreply.github.com>1 parent 52b2947 commit 4451d34
4 files changed
Lines changed: 43 additions & 53 deletions
File tree
- kubernetes/loculus
- preprocessing/nextclade
- src/loculus_preprocessing
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | | - | |
| 1253 | + | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
| |||
Lines changed: 23 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1589 | 1589 | | |
1590 | 1590 | | |
1591 | 1591 | | |
1592 | | - | |
| 1592 | + | |
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
| |||
1605 | 1605 | | |
1606 | 1606 | | |
1607 | 1607 | | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
1625 | 1608 | | |
1626 | 1609 | | |
1627 | 1610 | | |
| |||
1650 | 1633 | | |
1651 | 1634 | | |
1652 | 1635 | | |
| 1636 | + | |
1653 | 1637 | | |
1654 | 1638 | | |
1655 | 1639 | | |
1656 | | - | |
1657 | 1640 | | |
1658 | 1641 | | |
1659 | 1642 | | |
| |||
1663 | 1646 | | |
1664 | 1647 | | |
1665 | 1648 | | |
1666 | | - | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1667 | 1652 | | |
1668 | 1653 | | |
1669 | 1654 | | |
| |||
1704 | 1689 | | |
1705 | 1690 | | |
1706 | 1691 | | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | 1692 | | |
1718 | 1693 | | |
1719 | 1694 | | |
1720 | 1695 | | |
1721 | 1696 | | |
1722 | 1697 | | |
1723 | 1698 | | |
1724 | | - | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
1725 | 1702 | | |
1726 | 1703 | | |
1727 | 1704 | | |
1728 | 1705 | | |
1729 | 1706 | | |
1730 | 1707 | | |
1731 | 1708 | | |
| 1709 | + | |
1732 | 1710 | | |
1733 | 1711 | | |
1734 | 1712 | | |
1735 | | - | |
1736 | 1713 | | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
1737 | 1722 | | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
1748 | 1728 | | |
1749 | 1729 | | |
1750 | 1730 | | |
| |||
1790 | 1770 | | |
1791 | 1771 | | |
1792 | 1772 | | |
| 1773 | + | |
1793 | 1774 | | |
1794 | 1775 | | |
1795 | 1776 | | |
1796 | 1777 | | |
1797 | 1778 | | |
1798 | | - | |
1799 | 1779 | | |
1800 | 1780 | | |
1801 | 1781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
100 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
106 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
| |||
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| |||
0 commit comments