Browse Source

normalization of ASA values

Sebastian Bittrich 6 years ago
parent
commit
e5b6ac3996

+ 14 - 2
src/mol-model/structure/model/properties/utils/accessible-surface-area.ts

@@ -1,6 +1,7 @@
 import { Vec3 } from 'mol-math/linear-algebra';
 import { AtomicHierarchy, AtomicConformation } from '../atomic';
-import { ElementSymbol, VdwRadii } from '../../types';
+import { ElementSymbol, VdwRadii, MaxAsa, DefaultMaxAsa } from '../../types';
+import { max } from 'mol-data/int/impl/ordered-set';
 
 const defaultNumberOfPoints = 960;
 const defaultProbeSize = 1.4;
@@ -132,7 +133,18 @@ function calculateASA(ctx: ASAContext) {
         residueAsa[residueAtomSegments.index[i]] += value;
     }
 
-    // TODO (optionally) normalize by maximum value expected for a particular amino acid - needs lookup of max values
+    console.log(residueAsa);
+
+    // normalize by maximum value expected for a particular amino acid - needs lookup of max values
+    for (let i = 0; i < residues.label_comp_id.rowCount; ++i) {
+        // skip entities not part of a peptide chain
+        if (derived.residue.moleculeType[i] !== 4)
+            continue;
+
+        const maxAsa = (MaxAsa as any)[residues.label_comp_id.value(i)];
+        residueAsa[i] /= (maxAsa === undefined ? DefaultMaxAsa : maxAsa);
+    }
+
     console.log(residueAsa);
 }
 

+ 25 - 0
src/mol-model/structure/model/types.ts

@@ -390,6 +390,31 @@ export namespace SecondaryStructureType {
     }
 }
 
+/** Maximum accessible surface area observed for amino acids. Taken from: http://dx.doi.org/10.1371/journal.pone.0080635 */
+export const MaxAsa = {
+    'ALA': 121.0,
+    'ARG': 265.0,
+    'ASN': 187.0,
+    'ASP': 187.0,
+    'CYS': 148.0,
+    'GLU': 214.0,
+    'GLN': 214.0,
+    'GLY': 97.0,
+    'HIS': 216.0,
+    'ILE': 195.0,
+    'LEU': 191.0,
+    'LYS': 230.0,
+    'MET': 203.0,
+    'PHE': 228.0,
+    'PRO': 154.0,
+    'SER': 143.0,
+    'THR': 163.0,
+    'TRP': 264.0,
+    'TYR': 255.0,
+    'VAL': 165.0
+}
+export const DefaultMaxAsa = 121.0
+
 export const VdwRadii = {
     'H': 1.1,
     'HE': 1.4,