MCPcopy Create free account
hub / github.com/BirolLab/abyss / readAlignment

Function readAlignment

ParseAligns/ParseAligns.cpp:412–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412static void
413readAlignment(const string& line, ReadAlignMap& out)
414{
415 istringstream s(line);
416 pair<string, AlignmentVector> v;
417 switch (opt::inputFormat) {
418 case opt::SAM: {
419 SAMRecord sam;
420 s >> sam;
421 assert(s);
422 v.first = sam.qname;
423 if (sam.isRead1())
424 v.first += "/1";
425 else if (sam.isRead2())
426 v.first += "/2";
427 if (!sam.isUnmapped())
428 v.second.push_back(sam);
429 break;
430 }
431 case opt::KALIGNER: {
432 s >> v.first;
433 assert(s);
434 v.second.reserve(count(line.begin(), line.end(), '\t'));
435 v.second.assign(istream_iterator<Alignment>(s), istream_iterator<Alignment>());
436 assert(s.eof());
437 break;
438 }
439 }
440 handleAlignment(v, out);
441}
442
443static void
444readAlignments(istream& in, ReadAlignMap* pout)

Callers 1

readAlignmentsFunction · 0.70

Calls 9

isRead1Method · 0.80
isRead2Method · 0.80
isUnmappedMethod · 0.80
handleAlignmentFunction · 0.70
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
assignMethod · 0.45
eofMethod · 0.45

Tested by

no test coverage detected