X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignedCodonFrame.java;h=6faf7a69179a11f7a6a83c058b93bb52dcef8f6a;hb=b59e6ecc36fb98f4285213a685d0546e98ebd556;hp=0927dda472b244a41fd8c2d5c293f5fb64503aa0;hpb=87a707afdbbe1675330f7e82faaf9443af89cefe;p=jalview.git diff --git a/src/jalview/datamodel/AlignedCodonFrame.java b/src/jalview/datamodel/AlignedCodonFrame.java index 0927dda..6faf7a6 100644 --- a/src/jalview/datamodel/AlignedCodonFrame.java +++ b/src/jalview/datamodel/AlignedCodonFrame.java @@ -220,6 +220,10 @@ public class AlignedCodonFrame int[] codon = null; SequenceI mappedSeq = null; SequenceI ds = seq.getDatasetSequence(); + if (ds == null) + { + ds = seq; + } if (this.fromSeq == seq || this.fromSeq == ds) { @@ -429,7 +433,8 @@ public class AlignedCodonFrame /** * Add search results for regions in other sequences that translate or are - * translated from a particular position in seq + * translated from a particular position in seq (which may be an aligned or + * dataset sequence) * * @param seq * @param index @@ -441,6 +446,10 @@ public class AlignedCodonFrame SearchResultsI results) { SequenceI ds = seq.getDatasetSequence(); + if (ds == null) + { + ds = seq; + } for (SequenceToSequenceMapping ssm : mappings) { ssm.markMappedRegion(ds, index, results); @@ -945,9 +954,9 @@ public class AlignedCodonFrame } /** - * Returns the first mapping found which is between the given sequence and - * another, is a triplet mapping (3:1 or 1:3), and covers the full extent of - * both sequences involved. + * Returns the first mapping found which is between the given dataset sequence + * and another, is a triplet mapping (3:1 or 1:3), and covers the full extent + * of both sequences involved * * @param seq * @return