From: Jim Procter Date: Thu, 19 Feb 2015 15:01:35 +0000 (+0000) Subject: JAL-653 convenience method to resolve strand attribute for feature X-Git-Tag: Release_2_10_0~296^2~167 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7dc654060c394f6d205b7ad5503c792f37acbf32;p=jalview.git JAL-653 convenience method to resolve strand attribute for feature --- 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; + } + }