MCPcopy Create free account
hub / github.com/GregoryFaust/samblaster / fillTempLineArray

Function fillTempLineArray

samblaster.cpp:1145–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143
1144template <bool excludeSecondaries>
1145int fillTempLineArray(splitLine_t * block, state_t * state, int mask, bool flagValue)
1146{
1147 // Count the secondaries we have for this read (if any), and store their ptrs into an array.
1148 int count = 0;
1149 for (splitLine_t * line = block; line != NULL; line = line->next)
1150 {
1151 // For all the ones that are the current read of interest....
1152 // Check if they are a primary or complementary alignment.
1153 if (checkFlag(line, mask) == flagValue && !(excludeSecondaries && isSecondaryAlignment(line)))
1154 {
1155 // Add the ptr to this line to the sort array.
1156 // If it won't fit, double the array size.
1157 if (count >= state->splitterArrayMaxSize)
1158 {
1159 state->splitterArrayMaxSize *= 2;
1160 state->splitterArray = (splitLine_t **)(realloc(state->splitterArray,
1161 state->splitterArrayMaxSize * sizeof(splitLine_t *)));
1162 }
1163 state->splitterArray[count] = line;
1164 count += 1;
1165 }
1166 }
1167 return count;
1168}
1169
1170void markSplitterUnmappedClipped(splitLine_t * block, state_t * state, int mask, bool flagValue)
1171{

Callers

nothing calls this directly

Calls 2

checkFlagFunction · 0.85
isSecondaryAlignmentFunction · 0.85

Tested by

no test coverage detected