(byte[] bytes, int seqLen)
| 291 | } |
| 292 | |
| 293 | public static String bitsToSeq(byte[] bytes, int seqLen) { |
| 294 | int numFullBytes = seqLen / 4; |
| 295 | int numExtraBases = seqLen % 4; |
| 296 | |
| 297 | char[] sb = new char[seqLen]; |
| 298 | for (int i=0; i<numFullBytes; ++i) { |
| 299 | getTetramer(bytes[i]).getChars(0, 4, sb, i*4); |
| 300 | } |
| 301 | |
| 302 | if (numExtraBases > 0) { |
| 303 | String t = getTetramer(bytes[numFullBytes]); |
| 304 | int offset = numFullBytes*4; |
| 305 | for (int i=0; i<numExtraBases; ++i) { |
| 306 | sb[offset + i] = t.charAt(i); |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | return new String(sb); |
| 311 | } |
| 312 | |
| 313 | public static String bitsToSeqParallelized(byte[] bytes, int seqLen) { |
| 314 | int numFullBytes = seqLen / 4; |
no test coverage detected