فهرست منبع

Issue #805: offset fix in feature track

cycle20 1 سال پیش
والد
کامیت
4ac62c9938
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/examples/assembly-tm/FeatureViewConfig.ts
  2. 1 1
      src/examples/assembly-tm/preset2.ts

+ 1 - 1
src/examples/assembly-tm/FeatureViewConfig.ts

@@ -158,7 +158,7 @@ export async function createFeatureViewerConfing(params: { pdbEntry: string, pdb
 
     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!);
+    const offset = parseInt(chain?.residues[0].pdb_res_label!) - 1;
     jsvlibDescriptor.regions.forEach((region: any) => {
         region.start += offset;
         region.end += offset;

+ 1 - 1
src/examples/assembly-tm/preset2.ts

@@ -11,7 +11,7 @@ import {
     StateObjectSelector,
     StateObjectRef,
 } from 'molstar/lib/mol-state';
-import { Mat4, Vec3 } from 'molstar/lib/mol-math/linear-algebra';
+import { Mat4 } from 'molstar/lib/mol-math/linear-algebra';
 import { Target } from '@rcsb/rcsb-molstar/build/src/viewer/helpers/selection';
 import { MembraneOrientationPreset } from './tmdet-extension/behavior';
 import { StateTransforms } from 'molstar/lib/mol-plugin-state/transforms';