Package org.jmol.dssx
Class AnnotationParser
java.lang.Object
org.jmol.dssx.AnnotationParser
- All Implemented Interfaces:
JmolAnnotationParser
- Direct Known Subclasses:
DSSR1
A parser for output from 3DNA web service.
load =1d66/dssr
also other annotations now,
load *1cbs/dom
calls EBI for the mmCIF file and also retrieves the domains mapping JSON
report.
load *1cbs/val
calls EBI for the mmCIF file and also retrieves the validation outliers JSON
report.
Bob Hanson July 2014
- Author:
- Bob Hanson hansonr@stolaf.edu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
assignPDBH
(String group3, String sNames) calculateDSSRStructure
(Viewer vwr, javajs.util.BS bsAtoms) catalogStructureUnits
(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String, int[]> resMap, Object object, Map<String, Integer> modelMap) private boolean
catalogUnit
(Viewer viewer, float[][] vals, String unitID, float val, javajs.util.BS bsAtoms, int[] modelAtomIndices, Map<String, int[]> resMap, Map<String, Integer> atomMap, Map<String, Integer> modelMap) Carried out for each unitjavajs.util.Lst
<Object> catalogValidations
(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String, int[]> resMap, Map<String, Integer> atomMap, Map<String, Integer> modelMap) Returns a Lstprivate void
findAnnotationAtoms
(Viewer vwr, String name, javajs.util.Lst<SV> _list, String key, javajs.util.BS bs) find annotations; allows for wild cards InterPro.* where .....void
Adjusts _atoms bitset to account for added hydrogen atoms.fixDSSRJSONMap
(Map<String, Object> map) getAnnotationInfo
(Viewer vwr, SV a, String match, int type, int modelIndex) Get a string report of annotation dataprivate void
getAnnotationKVPairs
(SV a, String match, String dotPath, javajs.util.SB sb, String pre, boolean showDetail, boolean isMappingOnly, int type) Construct a nice listing for this annotation, including validationjavajs.util.BS
getAtomBits
(Viewer vwr, String key, Object dbObj, Map<String, Object> annotationCache, int type, int modelIndex, javajs.util.BS bsModel) void
getAtomicDSSRData
(ModelSet ms, int modelIndex, float[] dssrData, String dataType) javajs.util.Lst
<Float> getAtomValidation
(Viewer vwr, String type, Atom atom) Get all validation values corresponding to a specific validation type.getAttachedAtomForPDBH
(String group3, String name) Finds the standard attached heavy atom for a PDB H atom; used in EBI clash validation.void
getBasePairs
(Viewer vwr, int modelIndex) private String
getDataKey
(int type) javajs.util.P3[]
getDSSRFrame
(Map<String, Object> dssrNT) private SV
getMainItem
(Map<String, SV> data) javajs.util.Lst
<SV> initializeAnnotation
(SV objAnn, int type, int modelIndex) We create a main list of mappings, where each mapping has _atoms and _pathprivate javajs.util.BS
setAnnotationAtoms
(Viewer vwr, Map<String, SV> mapping, int i) void
-
Field Details
-
pdbAtomForH
-
-
Constructor Details
-
AnnotationParser
public AnnotationParser()
-
-
Method Details
-
getAnnotationKVPairs
private void getAnnotationKVPairs(SV a, String match, String dotPath, javajs.util.SB sb, String pre, boolean showDetail, boolean isMappingOnly, int type) Construct a nice listing for this annotation, including validation- Parameters:
a
-match
-dotPath
-sb
-pre
-showDetail
-isMappingOnly
-type
-
-
getDataKey
-
catalogStructureUnits
public String catalogStructureUnits(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String, int[]> resMap, Object object, Map<String, Integer> modelMap) - Specified by:
catalogStructureUnits
in interfaceJmolAnnotationParser
-
catalogValidations
public javajs.util.Lst<Object> catalogValidations(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String, int[]> resMap, Map<String, Integer> atomMap, Map<String, Integer> modelMap) Returns a Lst- Specified by:
catalogValidations
in interfaceJmolAnnotationParser
-
getMainItem
-
initializeAnnotation
We create a main list of mappings, where each mapping has _atoms and _path- Specified by:
initializeAnnotation
in interfaceJmolAnnotationParser
- Parameters:
objAnn
-- Returns:
- Lst of mappings
-
findAnnotationAtoms
private void findAnnotationAtoms(Viewer vwr, String name, javajs.util.Lst<SV> _list, String key, javajs.util.BS bs) find annotations; allows for wild cards InterPro.* where .....- Parameters:
vwr
-name
-_list
-key
-bs
-
-
setAnnotationAtoms
-
catalogUnit
private boolean catalogUnit(Viewer viewer, float[][] vals, String unitID, float val, javajs.util.BS bsAtoms, int[] modelAtomIndices, Map<String, int[]> resMap, Map<String, Integer> atomMap, Map<String, Integer> modelMap) Carried out for each unit- Parameters:
viewer
-vals
- model-based array of float values for a given validation typeunitID
-val
-bsAtoms
-modelAtomIndices
-resMap
-atomMap
-modelMap
- TODO- Returns:
- true if this is residue-based validation (to be added to H atoms when pdbAddHydrogens is set
-
getAtomBits
public javajs.util.BS getAtomBits(Viewer vwr, String key, Object dbObj, Map<String, Object> annotationCache, int type, int modelIndex, javajs.util.BS bsModel) - Specified by:
getAtomBits
in interfaceJmolAnnotationParser
-
getAtomValidation
Get all validation values corresponding to a specific validation type. Used by label %[validation.clashes]- Specified by:
getAtomValidation
in interfaceJmolAnnotationParser
- Parameters:
vwr
-type
- e.g. "clashes"atom
-- Returns:
- a list of Float values associated with this atom and this type of validation
-
getAnnotationInfo
Get a string report of annotation data- Specified by:
getAnnotationInfo
in interfaceJmolAnnotationParser
- Parameters:
a
- an annotation structure wrapped as a script variablematch
- can contain "mappings" to get those specifically- Returns:
- tab-separated line-based listing
-
getAttachedAtomForPDBH
Finds the standard attached heavy atom for a PDB H atom; used in EBI clash validation.- Parameters:
group3
-name
-- Returns:
- name of attached atom or hName
-
assignPDBH
-
fixAtoms
Adjusts _atoms bitset to account for added hydrogen atoms. A margin of 20 allows for 20 added H atoms per group- Specified by:
fixAtoms
in interfaceJmolAnnotationParser
-
getBasePairs
- Specified by:
getBasePairs
in interfaceJmolAnnotationParser
-
calculateDSSRStructure
- Specified by:
calculateDSSRStructure
in interfaceJmolAnnotationParser
-
fixDSSRJSONMap
- Specified by:
fixDSSRJSONMap
in interfaceJmolAnnotationParser
-
getHBonds
public String getHBonds(ModelSet ms, int modelIndex, javajs.util.Lst<Bond> vHBonds, boolean doReport) - Specified by:
getHBonds
in interfaceJmolAnnotationParser
-
getAtomicDSSRData
- Specified by:
getAtomicDSSRData
in interfaceJmolAnnotationParser
-
setGroup1
- Specified by:
setGroup1
in interfaceJmolAnnotationParser
-
getDSSRFrame
- Specified by:
getDSSRFrame
in interfaceJmolAnnotationParser
-