Skip to content

Commit

Permalink
Merge branch 'dnanexus-rnd-mlin-find-remove-orphans'
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Aug 25, 2015
2 parents bb981cc + 17ebaa7 commit e3c2ba8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,7 @@ int main_find(int argc, char** argv) {
if (context_size > 0) {
vindex.expand_context(graph, context_size);
}
graph.remove_orphan_edges();
graph.serialize_to_ostream(cout);
}
if (!range.empty()) {
Expand Down
6 changes: 4 additions & 2 deletions test/t/05_vg_find.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BASH_TAP_ROOT=../bash-tap

PATH=..:$PATH # for vg

plan tests 15
plan tests 16

vg construct -r small/x.fa -v small/x.vcf.gz >x.vg
is $? 0 "construction"
Expand All @@ -29,10 +29,12 @@ is $(vg find -S AGGGCTTTTAACTACTCCACATCCAAAGCTACCCAGGCCATTTTAAGTTTCCTGT x.vg | v

is $(vg find -S AGGGCTTTTAACTACTCCACATCCAAAGCTACCCAGGCCATTTTAAGTTTCCTGT -j 11 x.vg | vg view - | wc -l) 33 "vg find returns a correctly-sized graph when using jump-kmers"

is $(vg find -p x:0-100 x.vg | vg view -g - | wc -l) 58 "vg find returns a subgraph corresponding to particular reference coordinates"
is $(vg find -p x:0-100 x.vg | vg view -g - | wc -l) 42 "vg find returns a subgraph corresponding to particular reference coordinates"

is $(vg find -p x:0-100 x.vg | vg view -j - | jq ".node[].sequence" | tr -d '"\n' | wc -c) 100 "vg find returns a path of the correct length"

is $(vg find -p x:0-100 -c 1 x.vg | vg view -g - | wc -l) 70 "larger graph is returned when the reference path is queried with context"

is $(vg find -p x -c 10 x.vg | vg view -g - | wc -l) $(vg view -g x.vg | wc -l) "entire graph is returned when the reference path is queried with context"

is $(vg find -s 10 x.vg | wc -l) 1 "we can find edges on start"
Expand Down

0 comments on commit e3c2ba8

Please sign in to comment.