lib/bio/db/blast.rb in bio-polyploid-tools-0.8.4 vs lib/bio/db/blast.rb in bio-polyploid-tools-0.8.5

- old
+ new

@@ -77,10 +77,12 @@ end def self.align(opts={}) target=opts[:target] query=opts[:query] - cmdline = "blastn -query #{query} -db #{target} -outfmt '6 qseqid qstart qend qframe sseqid sstart send sframe score pident qlen slen qseq sseq'" + max_target_seqs = 15 + max_target_seqs = opts[:max_hits] + 1 if opts[:max_hits] + cmdline = "blastn -max_target_seqs #{max_target_seqs} -query #{query} -db #{target} -outfmt '6 qseqid qstart qend qframe sseqid sstart send sframe score pident qlen slen qseq sseq'" status, stdout, stderr = systemu cmdline if status.exitstatus == 0 alns = Array.new unless block_given? stdout.each_line do |e_l|