package jalview.analysis; import java.util.Hashtable; import java.util.Vector; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; import jalview.datamodel.ColumnSelection; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.schemes.ResidueProperties; import jalview.util.MapList; public class Dna { /** * * @param cdp1 * @param cdp2 * @return -1 if cdp1 aligns before cdp2, 0 if in the same column or cdp2 is null, +1 if after cdp2 */ private static int compare_codonpos(int[] cdp1, int[] cdp2) { if (cdp2==null || (cdp1[0]==cdp2[0] && cdp1[1] == cdp2[1] && cdp1[2] == cdp2[2])) return 0; if (cdp1[0]=aslen) aslen=aspos+1; break; // check the next position for alignment case 0: // codon aligns at aspos position. findpos = false; } } // codon aligns with all other sequence residues found at aspos protein.append(aa); if (codons[aspos]==null) { // mark this column as aligning to this aligned reading frame codons[aspos] = new int[] { cdp[0], cdp[1], cdp[2] }; } aspos++; if (aspos>=aslen) aslen=aspos+1; } } if (resSize>0) { newSeq[s] = new Sequence(selection[s].getName(), protein.toString()); if (rf!=0) { jalview.bin.Cache.log.debug("trimming contigs for incomplete terminal codon."); // trim contigs vc=scontigs.length-1; nend-=rf; // incomplete ORF could be broken over one or two visible contig intervals. while (vc>0 && scontigs[vc]>nend) { if (scontigs[vc-1]>nend) { vc-=2; } else { // correct last interval in list. scontigs[vc]=nend; } } if ((vc+2)