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

Method reverseComplement

src/rnabloom/util/SeqUtils.java:1120–1152  ·  view source on GitHub ↗
(String seq)

Source from the content-addressed store, hash-verified

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();

Callers 15

cutHairPinLoopMethod · 0.95
smallestStrandMethod · 0.95
writeMethod · 0.45
runMethod · 0.45
runMethod · 0.45
nextFRMethod · 0.45
nextRFMethod · 0.45
nextRRMethod · 0.45
nextMethod · 0.45
nextSegmentsMethod · 0.45
nextFRMethod · 0.45
nextRFMethod · 0.45

Calls 3

complementMethod · 0.95
hasNextMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected