Skip to content

Commit 2b05284

Browse files
committed
consensus
1 parent 1b40aa2 commit 2b05284

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/merge.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,12 @@ void _outputSelectedIntervals(MergeConfig& c, TGenomeIntervals const& iSelected,
450450
float srAlignQuality = 0;
451451
if (bcf_get_info_float(hdr[idx], rec[idx], "SRQ", &srq, &nsrq) > 0) srAlignQuality = *srq;
452452

453-
std::string consensus;
453+
std::string consStr;
454454
float ceVal = 0;
455455
int32_t consBpVal = 0;
456456
if (precise) {
457457
if (bcf_get_info_float(hdr[idx], rec[idx], "CE", &ce, &nce) > 0) ceVal = *ce;
458-
if (bcf_get_info_string(hdr[idx], rec[idx], "CONSENSUS", &cons, &ncons) > 0) consensus = boost::to_upper_copy(std::string(cons));
458+
if (bcf_get_info_string(hdr[idx], rec[idx], "CONSENSUS", &cons, &ncons) > 0) consStr = boost::to_upper_copy(std::string(cons));
459459
if (bcf_get_info_int32(hdr[idx], rec[idx], "CONSBP", &consbp, &nconsbp) > 0) consBpVal = *consbp;
460460
}
461461

@@ -508,8 +508,8 @@ void _outputSelectedIntervals(MergeConfig& c, TGenomeIntervals const& iSelected,
508508
bcf_update_info_int32(hdr_out, rout, "HOMLEN", &homlenVal, 1);
509509
bcf_update_info_int32(hdr_out, rout, "SR", &srSupport, 1);
510510
bcf_update_info_float(hdr_out, rout, "SRQ", &srAlignQuality, 1);
511-
if (consensus.size()) {
512-
bcf_update_info_string(hdr_out, rout, "CONSENSUS", consensus.c_str());
511+
if (consStr.size()) {
512+
bcf_update_info_string(hdr_out, rout, "CONSENSUS", consStr.c_str());
513513
bcf_update_info_float(hdr_out, rout, "CE", &ceVal, 1);
514514
bcf_update_info_int32(hdr_out, rout, "CONSBP", &consBpVal, 1);
515515
}

src/modvcf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace torali
1212
{
1313

1414

15-
void _remove_info_tag(bcf_hdr_t* hdr, bcf1_t* rec, std::string const& tag) {
15+
void _remove_info_tag(bcf_hdr_t const* hdr, bcf1_t* rec, std::string const& tag) {
1616
bcf_update_info(hdr, rec, tag.c_str(), NULL, 0, BCF_HT_INT); // Type does not matter for n = 0
1717
}
1818

19-
void _remove_format_tag(bcf_hdr_t* hdr, bcf1_t* rec, std::string const& tag) {
19+
void _remove_format_tag(bcf_hdr_t const* hdr, bcf1_t* rec, std::string const& tag) {
2020
bcf_update_format(hdr, rec, tag.c_str(), NULL, 0, BCF_HT_INT); // Type does not matter for n = 0
2121
}
2222

src/split.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ namespace torali
729729

730730
template<typename TConfig>
731731
inline bool
732-
alignConsensus(TConfig const& c, bam_hdr_t* hdr, char const* seq, char const* sndSeq, StructuralVariantRecord& sv, bool const realign) {
732+
alignConsensus(TConfig const& c, bam_hdr_t const* hdr, char const* seq, char const* sndSeq, StructuralVariantRecord& sv, bool const realign) {
733733
if ( (int32_t) sv.consensus.size() < (2 * c.minimumFlankSize + sv.insLen)) return false;
734734

735735
// Get reference slice

0 commit comments

Comments
 (0)