From: Jim Procter Date: Tue, 27 Oct 2020 10:54:58 +0000 (+0000) Subject: JAL-3700 JAL-3748 JAL-3763 don’t add stop codon via alignAs if guide peptide doesn... X-Git-Tag: Release_2_11_1_3~5^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fd25ac2905528f9c2cf784317cc3d150c9167755;p=jalview.git JAL-3700 JAL-3748 JAL-3763 don’t add stop codon via alignAs if guide peptide doesn’t include C terminus. --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index d8c1cdf..d04d810 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -979,10 +979,10 @@ public class AlignmentUtils .getFromRanges()); int mappedToLength = MappingUtils .getLength(mapList.getToRanges()); - boolean addStopCodon = (cdsLength == mappedFromLength + boolean addStopCodon = peptide.getDatasetSequence().getEnd()==peptide.getEnd() && ((cdsLength == mappedFromLength * CODON_LENGTH + CODON_LENGTH) || (peptide.getDatasetSequence() - .getLength() == mappedFromLength - 1); + .getLength() == mappedFromLength - 1)); if (cdsLength != mappedToLength && !addStopCodon) { System.err.println(String.format(