فهرست منبع

Issue #805: testing with 6f7h entry

cycle20 1 سال پیش
والد
کامیت
18c45f09ec
2فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 9 0
      src/examples/assembly-tm/FeatureViewConfig.ts
  2. 2 2
      src/examples/assembly-tm/index.ts

+ 9 - 0
src/examples/assembly-tm/FeatureViewConfig.ts

@@ -27,6 +27,7 @@ import {ViewerProps} from "@rcsb/rcsb-molstar/build/src/viewer";
 import { updateSiteColors } from "./UniTmpColor";
 import { fetchHtpDescriptor, fetchPdbtmJsvLibDescriptor, htpDescriptorToTrackData, jsvLibDescriptorToTrackData } from "./UniTmpHelper";
 import { TmDetRcsbPreset } from "./preset2";
+import { TmDetDescriptorCache } from "./tmdet-extension/prop";
 
 export async function createFeatureViewerConfing(params: { pdbEntry: string, pdbtmEntry: string, htpEntry: string, labelAsymId: string, side1: string }) {
     const modelId = `${params.pdbEntry}_model`;
@@ -155,6 +156,14 @@ export async function createFeatureViewerConfing(params: { pdbEntry: string, pdb
     rowConfig[0].trackData![0].value = sequence;
     rowConfig.push(...htpDescriptorToTrackData(htpDescriptor));
 
+    const descriptor = TmDetDescriptorCache.get(params.pdbEntry);
+    const chain = descriptor?.chains.filter(ch => ch.chain_label == params.labelAsymId)[0];
+    const offset = parseInt(chain?.residues[0].pdb_res_label!);
+    jsvlibDescriptor.regions.forEach((region: any) => {
+        region.start += offset;
+        region.end += offset;
+    });
+    console.log('JSVLIB:', jsvlibDescriptor);
     rowConfig.push(...jsvLibDescriptorToTrackData(jsvlibDescriptor));
 
     return { sequenceConfig: sequenceConfig, molstarConfig: molstarConfig };

+ 2 - 2
src/examples/assembly-tm/index.ts

@@ -10,11 +10,11 @@ document.addEventListener("DOMContentLoaded", (event) => {
 
         DebugUtil.enableLog();
 
-        const pdbEntry = "2atk";
+        const pdbEntry = "6f7h";
         const labelAsymId = "C";
         const params = {
             side1: "Inside",
-            htpEntry: "GLPA_HUMAN",
+            htpEntry: "AQP10_HUMAN",
             pdbEntry: pdbEntry,
             labelAsymId: labelAsymId,
             pdbtmEntry: `${pdbEntry}_${labelAsymId}`