Browse Source

MSA polymer checkbox indicator bug fixed

bioinsilico 1 year ago
parent
commit
50fe7b1ddf

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 [Semantic Versioning](https://semver.org/)
 
+## [4.0.1] - 2023-11-27
+### Bug fix
+- MSA polymer checkbox indicator bug fixed
+
 ## [4.0.0] - 2023-11-22
 ### Breaking changes
 - Types are not anymore exposed from `build/src`

+ 9 - 9
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "@rcsb/rcsb-saguaro-3d",
-  "version": "4.0.0-development.1",
+  "version": "4.0.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "@rcsb/rcsb-saguaro-3d",
-      "version": "4.0.0-development.1",
+      "version": "4.0.1",
       "license": "MIT",
       "dependencies": {
         "rxjs": "^7.5.6"
@@ -54,7 +54,7 @@
         "@rcsb/rcsb-api-tools": "^4.1.13",
         "@rcsb/rcsb-molstar": "^2.8.0",
         "@rcsb/rcsb-saguaro": "^3.0.3",
-        "@rcsb/rcsb-saguaro-app": "^6.0.0",
+        "@rcsb/rcsb-saguaro-app": "^6.0.2",
         "molstar": "^3.40.1",
         "react": "^18.1.0",
         "react-dom": "^18.1.0"
@@ -3558,9 +3558,9 @@
       }
     },
     "node_modules/@rcsb/rcsb-saguaro-app": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-6.0.0.tgz",
-      "integrity": "sha512-BDZpYBNeQryB6Cmu7llfL8lgS8NscAl941KWos34jRAxdGpyi54yQQtD1MZm581MSCNBgX49GCNh8fESOah38A==",
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-6.0.2.tgz",
+      "integrity": "sha512-6BV9Lmq7bd5LFfgcX7TmlRNmDLNb0uK6zlyPZR55ApgD0WZawfbq95VtF8oYoaNlPcIbZ4Z/6DBf0bse480LZQ==",
       "peer": true,
       "dependencies": {
         "@rcsb/rcsb-charts": "^0.2.21",
@@ -18822,9 +18822,9 @@
       }
     },
     "@rcsb/rcsb-saguaro-app": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-6.0.0.tgz",
-      "integrity": "sha512-BDZpYBNeQryB6Cmu7llfL8lgS8NscAl941KWos34jRAxdGpyi54yQQtD1MZm581MSCNBgX49GCNh8fESOah38A==",
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-6.0.2.tgz",
+      "integrity": "sha512-6BV9Lmq7bd5LFfgcX7TmlRNmDLNb0uK6zlyPZR55ApgD0WZawfbq95VtF8oYoaNlPcIbZ4Z/6DBf0bse480LZQ==",
       "peer": true,
       "requires": {
         "@rcsb/rcsb-charts": "^0.2.21",

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@rcsb/rcsb-saguaro-3d",
-  "version": "4.0.0",
+  "version": "4.0.1",
   "description": "RCSB Molstar/Saguaro Web App",
   "main": "build/dist/app.js",
   "files": [
@@ -90,7 +90,7 @@
     "@rcsb/rcsb-api-tools": "^4.1.13",
     "@rcsb/rcsb-molstar": "^2.8.0",
     "@rcsb/rcsb-saguaro": "^3.0.3",
-    "@rcsb/rcsb-saguaro-app": "^6.0.0",
+    "@rcsb/rcsb-saguaro-app": "^6.0.2",
     "molstar": "^3.40.1",
     "react": "^18.1.0",
     "react-dom": "^18.1.0"

+ 8 - 4
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/MsaPfvComponents/MsaRowTitleCheckboxComponent.tsx

@@ -203,9 +203,9 @@ export class MsaRowTitleCheckboxComponent extends React.Component <MsaRowTitleCh
     private async polymerTest(): Promise<boolean> {
         const entryId = this.props.entryId;
         const entryInfo = (await rcsbRequestCtxManager.getEntryProperties(entryId))[0];
-        if(entryInfo && entryInfo.entityToInstance.size > 1)
-            return true;
-        if(entryInfo && entryInfo.entityToInstance && Array.from(entryInfo.entityToInstance.get(this.compId()) ?? []).length > 1)
+        const polymerChains = Array.from(entryInfo.entityToInstance.values()).flat();
+        const assemblyChains = Array.from(entryInfo.instanceToOperator?.get(`${this.props.entryId}-1`)?.keys() ?? []).filter( chId => polymerChains.includes(chId));
+        if(assemblyChains && assemblyChains.length > 1)
             return true;
         if(entryInfo && (entryInfo.instanceToOperator?.get(`${this.props.entryId}-1`)?.get( (entryInfo.entityToInstance.get(this.compId()) ?? [""])[0] )?.length ?? 0) > 1)
             return true;
@@ -215,7 +215,11 @@ export class MsaRowTitleCheckboxComponent extends React.Component <MsaRowTitleCh
     private async nonPolymerTest(): Promise<boolean> {
         const entryId = this.props.entryId;
         const entryInfo = (await rcsbRequestCtxManager.getEntryProperties(entryId))[0];
-        return entryInfo && entryInfo.nonPolymerEntityToInstance && entryInfo.nonPolymerEntityToInstance.size > 0;
+        if(entryInfo && Array.from(entryInfo.entityToPrd.values()).filter(v=>v!="").length > 0)
+            return true;
+        if(entryInfo && entryInfo.nonPolymerEntityToInstance && entryInfo.nonPolymerEntityToInstance.size > 0)
+            return true;
+        return false;
     }
 
 }

+ 1 - 1
src/examples/sequence-identity/index.ts

@@ -3,7 +3,7 @@ import {RcsbFv3DSequenceIdentity} from "../../RcsbFv3D/RcsbFv3DSequenceIdentity"
 
 document.addEventListener("DOMContentLoaded", function(event) {
 
-    const groupId: string = "116_30";
+    const groupId: string = "73_30";
     const panel3d = new RcsbFv3DSequenceIdentity({
         elementId: "none",
         config:{

+ 0 - 2
webpack.server.dev.config.js

@@ -39,8 +39,6 @@ const commonConfig = {
                         localIdentName:'[local]'
                     }
                 }
-            }, {
-                loader: 'resolve-url-loader'
             }, {
                 loader: 'sass-loader',
                 options: {