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

Function writeSAMlineWithIdNum

samblaster.cpp:528–539  ·  view source on GitHub ↗

Special version of write line that appends an id number to the output. Used to output splitters.

Source from the content-addressed store, hash-verified

526// Special version of write line that appends an id number to the output.
527// Used to output splitters.
528void writeSAMlineWithIdNum(splitLine_t * line, FILE * output)
529{
530 // Unsplit the line.
531 unsplitSplitLine(line);
532 // Split it two ways to isolate the id field.
533 splitSplitLine(line, 2);
534 outputString(line->fields[0], output);
535 if (isPaired(line)) fprintf(output, "_%d\t", isFirstRead(line) ? 1 : 2);
536 else fprintf(output, "\t");
537 outputString(line->fields[1], output);
538 fprintf(output, "\n");
539}
540
541///////////////////////////////////////////////////////////////////////////////
542// Sequence Map

Callers 1

processSAMBlockFunction · 0.85

Calls 5

unsplitSplitLineFunction · 0.85
splitSplitLineFunction · 0.85
outputStringFunction · 0.85
isPairedFunction · 0.85
isFirstReadFunction · 0.85

Tested by

no test coverage detected