From f00f89c37f7eeeadf3069565705a15085e0bb3a4 Mon Sep 17 00:00:00 2001 From: "Ben J. Woodcroft" Date: Sat, 22 Mar 2014 09:08:12 +1000 Subject: [PATCH] minor bugfix --- lib/bio-velvet/graph.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bio-velvet/graph.rb b/lib/bio-velvet/graph.rb index 658e831..7a3e3a5 100644 --- a/lib/bio-velvet/graph.rb +++ b/lib/bio-velvet/graph.rb @@ -571,6 +571,10 @@ class NodedRead def self.apply_grep_hack(graph, path_to_graph_file, interesting_read_ids, interesting_node_ids, grep_context) interesting_read_ids ||= [] interesting_node_ids ||= [] + if interesting_read_ids.empty? and interesting_node_ids.empty? + log.debug "Nothing to grep for in grep hack" if log.debug? + return + end Tempfile.open('grep_v_hack') do |tempfile| # Create a file to pass to grep -f