From 7dc654060c394f6d205b7ad5503c792f37acbf32 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 19 Feb 2015 15:01:35 +0000 Subject: [PATCH] JAL-653 convenience method to resolve strand attribute for feature --- src/jalview/datamodel/SequenceFeature.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 28ab82c..1b6498f 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -302,4 +302,23 @@ public class SequenceFeature return begin; } + public int getStrand() + { + String str; + if (otherDetails == null + || (str = otherDetails.get("STRAND").toString()) == null) + { + return 0; + } + if (str.equals("-")) + { + return -1; + } + if (str.equals("+")) + { + return 1; + } + return 0; + } + } -- 1.7.10.2