Skip to content

Commit

Permalink
Tests for multi-chromosome GAM/GAF GBWT
Browse files Browse the repository at this point in the history
  • Loading branch information
jltsiren committed Nov 4, 2024
1 parent a585bbc commit c1b5803
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions test/t/37_vg_gbwt.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BASH_TAP_ROOT=../deps/bash-tap

PATH=../bin:$PATH # for vg

plan tests 149
plan tests 155


# Build vg graphs for two chromosomes
Expand Down Expand Up @@ -50,7 +50,7 @@ rm -f x.ref.gbwt


# Single chromosome: alignments
vg paths -v x.vg -X -Q _alt > x.alts.gam
vg paths -x x.vg -X -Q _alt > x.alts.gam
vg convert -G x.alts.gam x.vg > x.alts.gaf
vg gbwt -A --num-jobs 1 -o x.alts.gaf.gbwt -x x.vg x.alts.gaf
is $? 0 "chromosome X GAF with vg gbwt"
Expand Down Expand Up @@ -108,6 +108,25 @@ rm -f x.gbwt y.gbwt xy.merge.gbwt xy.fast.gbwt xy.parallel.gbwt xy.direct.gbwt x
rm -f xy.1000gp.gbwt


# Multiple chromosomes: alignments
vg paths -x xy-alt.xg -X -Q _alt > xy.alts.gam
vg convert -G xy.alts.gam xy.xg > xy.alts.gaf
vg gbwt -A --num-jobs 1 -o xy.alts.gaf.gbwt -x xy.xg xy.alts.gaf
is $? 0 "multi-chromosome GAF with vg gbwt"
vg gbwt -A --num-jobs 1 --gam-format -o xy.alts.gam.gbwt -x xy.xg xy.alts.gam
is $? 0 "multi-chromosome GAM with vg gbwt"
cmp xy.alts.gaf.gbwt xy.alts.gaf.gbwt
is $? 0 "identical construction results from GAF and GAM"

vg gbwt -A --num-jobs 2 -o multi.gbwt -x xy.xg xy.alts.gaf
is $? 0 "multi-chromosome GAF with vg gbwt using multiple jobs"
is $(vg gbwt -c xy.alts.gaf.gbwt) 58 "single job: 58 paths"
is $(vg gbwt -c multi.gbwt) 58 "multiple jobs: 58 paths"

rm -f xy.alts.gam xy.alts.gaf
rm -f xy.alts.gaf.gbwt xy.alts.gam.gbwt multi.gbwt


# Multiple chromosomes: paths as contigs
vg gbwt -E -o xy.contigs.gbwt -x xy.xg
is $? 0 "paths as contigs with vg gbwt"
Expand Down

0 comments on commit c1b5803

Please sign in to comment.