diff --git a/package-lock.json b/package-lock.json
index 5ff415fa3..30b2934f1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "covidcg",
- "version": "2.2.2",
+ "version": "2.2.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index e973deae7..37d09bf41 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "covidcg",
- "version": "2.2.2",
+ "version": "2.2.3",
"description": "",
"engines": {
"node": ">=8",
diff --git a/src/components/GroupReport/GroupStructuralViewer.js b/src/components/GroupReport/GroupStructuralViewer.js
index 6b648ad79..e37e7c3aa 100644
--- a/src/components/GroupReport/GroupStructuralViewer.js
+++ b/src/components/GroupReport/GroupStructuralViewer.js
@@ -8,6 +8,7 @@ import { colorHeatmap, getMoleculeAssemblies } from '../LiteMol/litemolutils';
import { reds } from '../../constants/colors';
import { hexToRgb } from '../../utils/color';
import { getAllProteins } from '../../utils/gene_protein';
+import defaultStructures from '../../../static_data/default_structures.json';
import EmptyPlot from '../Common/EmptyPlot';
import DownloadPymolScriptModal from '../Modals/DownloadPymolScriptModal';
@@ -64,11 +65,24 @@ const StructuralViewer = observer(() => {
};
const onChangeReportStructureActiveProtein = (event) => {
const newProtein = event.target.value;
+
+ if (newProtein === state.activeProtein) {
+ return;
+ }
+
setState({
...state,
activeProtein: newProtein,
activeProteinChanged:
newProtein != plotSettingsStore.reportStructureActiveProtein,
+ // Clear PDB ID when protein changes
+ pdbId: Object.keys(defaultStructures).includes(newProtein)
+ ? defaultStructures[newProtein]
+ : '',
+ validPdbId: Object.keys(defaultStructures).includes(newProtein)
+ ? true
+ : false,
+ pdbIdChanged: true,
});
};
const onChangePdbId = (event) => {
@@ -300,17 +314,6 @@ const StructuralViewer = observer(() => {
Min Counts is defined as the minimum number of sequences with this ${groupName} in a given continent on a given week
Min Percent is defined as the minimum percent of sequences with this ${groupName} in a given continent on a given week
`} - data-html="true" - data-place="right" - data-for="main-tooltip" - style={{ marginRight: 8 }} +Min Counts is defined as the minimum number of sequences with this ${groupName} in a given continent on a given week
Min Percent is defined as the minimum percent of sequences with this ${groupName} in a given continent on a given week
Min Correlation is defined as the minimum Pearson correlation of the % sequences of this ${groupName}. For the correlation calculations, the last ${config.surv_end_date_days_ago} days from today are omitted, to reduce noise in this metric.
`} - data-html="true" - data-place="right" - data-for="main-tooltip" - style={{ marginRight: 8 }} - /> -Min Counts is defined as the minimum number of sequences with this ${groupName} in a given continent on a given week
Min Percent is defined as the minimum percent of sequences with this ${groupName} in a given continent on a given week
Min Correlation is defined as the minimum Pearson correlation of the % sequences of this ${groupName}. For the correlation calculations, the last ${config.surv_end_date_days_ago} days from today are omitted, to reduce noise in this metric.
`} + data-html="true" + data-place="right" + data-for="main-tooltip" + style={{ marginRight: 8 }} /> - - -