JAL-3806 JAL-3725 propagate relaxed criteria for stop codon truncation from EMBLXmlSo...
[jalview.git] / src / jalview / io / EMBLLikeFlatFile.java
index 64943b2..100fb8d 100644 (file)
@@ -83,8 +83,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
 
   /**
    * Truncates (if necessary) the exon intervals to match 3 times the length of
-   * the protein; also accepts 3 bases longer (for stop codon not included in
-   * protein)
+   * the protein(including truncation for stop codon included in exon)
    * 
    * @param proteinLength
    * @param exon
@@ -102,11 +101,9 @@ public abstract class EMBLLikeFlatFile extends AlignFile
     int exonLength = MappingUtils.getLength(Arrays.asList(exon));
 
     /*
-     * if exon length matches protein, or is shorter, or longer by the 
-     * length of a stop codon (3 bases), then leave it unchanged
+     * if exon length matches protein, or is shorter, then leave it unchanged
      */
-    if (expectedCdsLength >= exonLength
-            || expectedCdsLength == exonLength - 3)
+    if (expectedCdsLength >= exonLength)
     {
       return exon;
     }