From: gmungoc Date: Wed, 16 Nov 2016 10:50:37 +0000 (+0000) Subject: JAL-2295 don't exclude RESNUM from transfer to Chimera X-Git-Tag: Release_2_11_0~62^2~47 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6901823e2a786413c64e8225c4b530e0d9c829d0;p=jalview.git JAL-2295 don't exclude RESNUM from transfer to Chimera --- diff --git a/src/jalview/ext/rbvi/chimera/ChimeraCommands.java b/src/jalview/ext/rbvi/chimera/ChimeraCommands.java index 533b441..07c0015 100644 --- a/src/jalview/ext/rbvi/chimera/ChimeraCommands.java +++ b/src/jalview/ext/rbvi/chimera/ChimeraCommands.java @@ -38,8 +38,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import MCview.PDBChain; - /** * Routines for generating Chimera commands for Jalview/Chimera binding * @@ -407,8 +405,7 @@ public class ChimeraCommands */ boolean isFromViewer = JalviewChimeraBinding.CHIMERA_FEATURE_GROUP .equals(sf.getFeatureGroup()); - if (isFromViewer || !visibleFeatures.contains(type) - || suppressFeature(type)) + if (isFromViewer || !visibleFeatures.contains(type)) { continue; } @@ -443,18 +440,6 @@ public class ChimeraCommands } /** - * Answers true if the feature type is one we don't wish to propagate to - * Chimera - for now, RESNUM - * - * @param type - * @return - */ - static boolean suppressFeature(String type) - { - return PDBChain.RESNUM_FEATURE.equals(type); - } - - /** * Traverse the map of features/values/models/chains/positions to construct a * list of 'setattr' commands (one per distinct feature type and value). *

diff --git a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java index 1b7d9d0..a31a065 100644 --- a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java +++ b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java @@ -246,6 +246,8 @@ public class JalviewChimeraView 62, -2.1f, null)); sq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 65, 65, 3.6f, null)); + sq.addSequenceFeature(new SequenceFeature("RESNUM", "ALA: 2 4zhoA", + 53, 53, Float.NaN, null)); /* * set all features visible except for chain @@ -257,6 +259,7 @@ public class JalviewChimeraView fr.setVisible("metal ion-binding site"); fr.setVisible("helix"); fr.setVisible("kd"); + fr.setVisible("RESNUM"); /* * 'perform' menu action to copy visible features to @@ -285,6 +288,7 @@ public class JalviewChimeraView assertTrue(reply.contains("resattr jv_metal_ion_binding_site")); assertTrue(reply.contains("resattr jv_helix")); assertTrue(reply.contains("resattr jv_kd")); + assertTrue(reply.contains("resattr jv_RESNUM")); // feature is not on a mapped region - no attribute created assertFalse(reply.contains("resattr jv_transit_peptide")); // feature is not visible - no attribute created