Skip to content

Commit

Permalink
fix rgfa tests post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed Oct 6, 2023
1 parent 0ad32a2 commit 9df2a05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/algorithms/gfa_to_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,6 @@ tuple<string, size_t, string, pair<int64_t, int64_t>, GFAParser::chars_t, GFAPar

// Grab the haplotype number
int64_t haplotype_number = take_number(cursor, end, -1, "parsing haplotype number");
if (haplotype_number == -1) {
// This field is required
throw GFAFormatError("Missing haplotype number in W line", cursor);
}
take_tab(cursor, end, "parsing end of haplotype number");

// Grab the sequence/contig/locus name
Expand Down
6 changes: 2 additions & 4 deletions test/t/48_vg_convert.t
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,13 @@ is "${?}" "0" "GFA -> HashGraph -> GFA conversion preserves path metadata"

# We can't do rGFA to GBZ directly until the GBWTGraph GFA parser learns to read tags
# rGFA to HashGraph to GBZ to GFA
# todo: would be great if gbz could preserve the NO_HAPLOTYPE
# gbz also strips the end of the subrange
vg paths -M -x graphs/rgfa_with_reference.rgfa | sed -e 's/NO_HAPLOTYPE/0/g' -e 's/_rGFA_#/_rGFA_#0#/g' -e 's/-2//g' -e 's/-8//g' | sort >paths.truth.txt
vg paths -M -x graphs/rgfa_with_reference.rgfa | sed -e 's/-2//g' -e 's/-8//g' | sort >paths.truth.txt
vg convert -a graphs/rgfa_with_reference.rgfa > rgfa_with_reference.hg
vg gbwt -x rgfa_with_reference.hg -E --gbz-format -g rgfa_with_reference.gbz
vg paths -M -x rgfa_with_reference.gbz | sort >paths.gbz.txt
cmp paths.gbz.txt paths.truth.txt
is "${?}" "0" "rGFA -> HashGraph -> GBZ conversion preserves path metadata"
vg paths -M -x graphs/rgfa_with_reference.rgfa | sed -e 's/NO_HAPLOTYPE/0/g' -e 's/_rGFA_#/_rGFA_#0#/g' | sort >paths.truth.txt
vg paths -M -x graphs/rgfa_with_reference.rgfa | sort >paths.truth.txt
vg convert -f rgfa_with_reference.gbz >extracted.gfa
vg paths -M -x extracted.gfa | sort >paths.gfa.txt
cmp paths.gfa.txt paths.truth.txt
Expand Down

1 comment on commit 9df2a05

@adamnovak
Copy link
Member

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 rgfa2. View the full report here.

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

Please sign in to comment.