Skip to content

Commit

Permalink
Handle the other conversion case
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak committed Oct 4, 2023
1 parent 9016d97 commit 268af3a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/subcommand/convert_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,16 +661,9 @@ void add_and_adjust_paths(const PathHandleGraph* input, MutablePathHandleGraph*
// Compose the new reference-ified metadata
std::string sample = input->get_sample_name(path);
std::string locus = input->get_locus_name(path);
int64_t haplotype;
if (sample_to_haplotypes[sample].size() > 1) {
// We should preserve the haplotype because we have multiple
// haplotype phases of this sample.
haplotype = input->get_haplotype(path);
} else {
// We should drop the haplotype number because this sample has only
// one haplotype phase.
haplotype = PathMetadata::NO_HAPLOTYPE;
}
// We should always preserve the haplotype phase number; we
// will need it if we ever want to go back to haplotype sense.
int64_t haplotype = input->get_haplotype(path);
auto subrange = input->get_subrange(path);
bool is_circular = input->get_is_circular(path);

Expand Down

1 comment on commit 268af3a

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch no-haplotype. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17192 seconds

Please sign in to comment.