(String seq)
| 1118 | } |
| 1119 | |
| 1120 | public static final String reverseComplement(String seq) { |
| 1121 | int seqLen = seq.length(); |
| 1122 | char[] rc = new char[seqLen]; |
| 1123 | |
| 1124 | PrimitiveIterator.OfInt itr = seq.chars().iterator(); |
| 1125 | int i = seqLen; |
| 1126 | int c; |
| 1127 | |
| 1128 | while (itr.hasNext()) { |
| 1129 | c = itr.nextInt(); |
| 1130 | switch(c) { |
| 1131 | case CHAR_A_INT: |
| 1132 | rc[--i] = 'T'; |
| 1133 | break; |
| 1134 | case CHAR_C_INT: |
| 1135 | rc[--i] = 'G'; |
| 1136 | break; |
| 1137 | case CHAR_G_INT: |
| 1138 | rc[--i] = 'C'; |
| 1139 | break; |
| 1140 | case CHAR_T_INT: |
| 1141 | rc[--i] = 'A'; |
| 1142 | break; |
| 1143 | case CHAR_U_INT: |
| 1144 | rc[--i] = 'A'; |
| 1145 | break; |
| 1146 | default: |
| 1147 | rc[--i] = 'N'; |
| 1148 | } |
| 1149 | } |
| 1150 | |
| 1151 | return new String(rc); |
| 1152 | } |
| 1153 | |
| 1154 | public static final String cutHairPinLoop(final String seq, final int seedSize, final float minPercentIdentity) { |
| 1155 | int seqLen = seq.length(); |
no test coverage detected