From ba831154b9f32a28d7b0171cc89da59e3d677085 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 16 Dec 2014 10:29:08 +0000 Subject: [PATCH] JAL-845 formatting only (block parentheses) --- src/jalview/datamodel/AlignedCodonFrame.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/jalview/datamodel/AlignedCodonFrame.java b/src/jalview/datamodel/AlignedCodonFrame.java index 3fc08d1..0740795 100644 --- a/src/jalview/datamodel/AlignedCodonFrame.java +++ b/src/jalview/datamodel/AlignedCodonFrame.java @@ -20,11 +20,11 @@ */ package jalview.datamodel; +import jalview.util.MapList; + import java.util.Enumeration; import java.util.Vector; -import jalview.util.MapList; - /** * Stores mapping between the columns of a protein alignment and a DNA alignment * and a list of individual codon to amino acid mappings between sequences. @@ -58,7 +58,9 @@ public class AlignedCodonFrame } codons = new int[aWidth][]; for (int res = 0; res < aWidth; res++) + { codons[res] = null; + } } /** @@ -191,7 +193,9 @@ public class AlignedCodonFrame public SequenceI[] getAaSeqs() { if (dnaToProt == null) + { return null; + } SequenceI[] sqs = new SequenceI[dnaToProt.length]; for (int sz = 0; sz < dnaToProt.length; sz++) { @@ -203,7 +207,9 @@ public class AlignedCodonFrame public MapList[] getdnaToProt() { if (dnaToProt == null) + { return null; + } MapList[] sqs = new MapList[dnaToProt.length]; for (int sz = 0; sz < dnaToProt.length; sz++) { @@ -232,7 +238,9 @@ public class AlignedCodonFrame for (int ds = 0; ds < dnaSeqs.length; ds++) { if (dnaSeqs[ds] == dnaSeqRef || dnaSeqs[ds] == dnads) + { return dnaToProt[ds].to; + } } return null; } @@ -252,7 +260,9 @@ public class AlignedCodonFrame for (int as = 0; as < dnaToProt.length; as++) { if (dnaToProt[as].to == aaSeqRef || dnaToProt[as].to == aads) + { return dnaSeqs[as]; + } } return null; } -- 1.7.10.2