MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / stringToBytes

Method stringToBytes

src/rnabloom/util/SeqUtils.java:64–79  ·  view source on GitHub ↗
(String seq, int len)

Source from the content-addressed store, hash-verified

62 private static final float LOW_COMPLEXITY_THRESHOLD_LONG_SEQ = 0.89f;
63
64 public static final byte[] stringToBytes(String seq, int len) {
65 byte[] arr = new byte[len];
66
67 byte b;
68 for (int i=0; i<len; ++i) {
69 b = (byte) seq.charAt(i);
70 if (b == CHAR_U_INT) {
71 arr[i] = CHAR_T_INT;
72 }
73 else {
74 arr[i] = b;
75 }
76 }
77
78 return arr;
79 }
80
81 public static final String bytesToString(byte[] bytes, int len) {
82 StringBuilder sb = new StringBuilder(len);

Callers 5

CanonicalKmerMethod · 0.80
KmerMethod · 0.80
getKmersMethod · 0.80
getKmersMethod · 0.80
mainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected