static void addDebugInfo( const bool isFirstOfPair, const SVCandidate& sv, const SVCandidateAssemblyData& assemblyData, VcfWriterSV::InfoTag_t& infotags) { if (!assemblyData.isSpanning) return; const bool isFirst = (assemblyData.bporient.isBp1First == isFirstOfPair); const bool isRightOpen = (isFirstOfPair ? sv.bp1.state : sv.bp2.state) == SVBreakendState::RIGHT_OPEN; infotags.push_back(str(boost::format("FOOBAR_FW=%1%") % (isFirst == isRightOpen))); if (!isFirst) return; // only the first breakpoint gets the alignments attached to its VCF entry infotags.push_back(str(boost::format("FOOBAR_bp1=%i;bp2=%i") % sv.bp1.interval.tid % sv.bp2.interval.tid)); // there can be several contigs per breakend, so we iterate over all of them. const unsigned numContigs(assemblyData.contigs.size()); infotags.push_back(str(boost::format("FOOBAR_NCONTIGS=%i") % numContigs)); if (numContigs > 0) { if (numContigs != assemblyData.spanningAlignments.size()) infotags.push_back(str(boost::format("FOOBAR_ERROR=%i;%i") % numContigs % assemblyData.spanningAlignments.size())); if (numContigs <= assemblyData.bestAlignmentIndex) infotags.push_back(str(boost::format("FOOBAR_ERROR2=%i;%i") % numContigs % assemblyData.bestAlignmentIndex)); infotags.push_back(str(boost::format("FOOBAR_BEST=%i") % assemblyData.bestAlignmentIndex)); //infotags.push_back(str(boost::format("FOOBAR_EXTCONTIG=%s") % assemblyData.extendedContigs[assemblyData.bestAlignmentIndex])); infotags.push_back(str(boost::format("FOOBAR_CONTIGcount=%i") % assemblyData.contigs[assemblyData.bestAlignmentIndex].supportReads.size())); } }
static void addSharedInfo( const EventInfo& event, VcfWriterSV::InfoTag_t& infoTags) { if (event.isEvent()) { infoTags.push_back( str(boost::format("EVENT=%i") % event.label)); } }