Advertisement
Guest User

fewf

a guest
Nov 20th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1.    public static String nucleotidesNoDashs(char[] nucleotides) {
  2.     String codon = new String(nucleotides);
  3.     for (char n : nucleotides) {
  4.          int nucleotideIndex = getNucleotideIndex(n);
  5.          if (nucleotideIndex < 0) {
  6.             codon.replace("-", "");
  7.            
  8.         }
  9.          else {
  10.             }
  11.     }
  12.     return codon;
  13.    }
  14.    
  15.    public static String[] getCodonList(char[] nucleotides, String codon) {
  16.     int codonCount = codon.length();
  17.     String[] codonList = new String[codonCount];
  18.    
  19.     for (int i = 0; i < (codonCount) / 3; i++) {
  20.         codonList[i] = codon.substring(0, 3);
  21.     }
  22.     return codonList;      
  23.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement