Skip to content

Commit ddc58a7

Browse files
committed
ignore aw hap
1 parent f1c5e97 commit ddc58a7

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/graph/constructor.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ void add_var_record(std::vector<VarRecord> & var_records,
15561556
continue;
15571557
}
15581558

1559-
if (key != "GT_ANTI_HAPLOTYPE" && key != "GT_HAPLOTYPE")
1559+
if (key != "GT_ANTI_HAPLOTYPE")
15601560
continue;
15611561

15621562
seqan::CharString value = EQ_SIGN_POS < static_cast<int>(seqan::length(info))
@@ -1573,16 +1573,7 @@ void add_var_record(std::vector<VarRecord> & var_records,
15731573
std::string val_str = seqan::toCString(val);
15741574

15751575
if (key == "GT_ANTI_HAPLOTYPE")
1576-
{
15771576
alt.anti_events.insert(std::stoul(val_str));
1578-
}
1579-
else
1580-
{
1581-
assert(key == "GT_HAPLOTYPE");
1582-
int const val_ul = std::stol(val_str);
1583-
// ref.anti_events.insert(val_ul);
1584-
alt.anti_events.insert(-val_ul);
1585-
}
15861577
} // for (auto const & val : values)
15871578
} // for (auto const & info : infos)
15881579
} // if (var.alts.size() == 1)

test/graph/test_constructor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,7 @@ TEST_CASE("Construct test graph with anti events (chr10)")
531531

532532
{
533533
REQUIRE(var_nodes[0].anti_events.size() == 0);
534-
REQUIRE(var_nodes[1].anti_events.size() == 1);
535-
REQUIRE(var_nodes[1].anti_events.count(-2) == 1);
534+
REQUIRE(var_nodes[1].anti_events.size() == 0);
536535
REQUIRE(var_nodes[2].anti_events.size() == 0);
537536
REQUIRE(var_nodes[3].anti_events.size() == 0);
538537
}
@@ -553,7 +552,7 @@ TEST_CASE("Construct test graph with anti events (chr11)")
553552

554553
{
555554
REQUIRE(ref_nodes.size() == 2);
556-
REQUIRE(var_nodes.size() == 4);
555+
REQUIRE(var_nodes.size() == 6);
557556
}
558557

559558
Options::instance()->add_all_variants = false;

test/index/test_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ TEST_CASE("Test index chr10 with parity event")
431431
REQUIRE(labels[0].variant_id != labels[1].variant_id);
432432

433433
labels = ph_index.get(gyper::to_uint64("AGGGGGGTGGGGGGGGGGGGGGGGGGGGGGGG", 0));
434-
REQUIRE(labels.size() == 0);
434+
REQUIRE(labels.size() == 2);
435435

436436
labels = ph_index.get(gyper::to_uint64("AGGGGGAGTGGGGGGGGGGGGGGGGGGGGGGG", 0));
437437

0 commit comments

Comments
 (0)