X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fassemble_seq_velvet;h=d613967586368f3ff377be48987095cbb60ee6d9;hb=d60eb606d5f5f830620a39ea506079fc96a077ee;hp=90cf759b8c82c6fd947c6356a85961c2b20e2c19;hpb=d5a8efe4d822a139b452bd35e2353aaccd84ac4c;p=biopieces.git diff --git a/bp_bin/assemble_seq_velvet b/bp_bin/assemble_seq_velvet index 90cf759..d613967 100755 --- a/bp_bin/assemble_seq_velvet +++ b/bp_bin/assemble_seq_velvet @@ -63,7 +63,7 @@ class Velvet end end - def run_velvetg(cov_cutoff, exp_cov) + def run_velvetg(cov_cutoff, exp_cov, paired) Dir.glob("#{@directory}/Kmer_*").each do |dir_velveth| files_velveth = Dir.glob("#{dir_velveth}/*") @@ -77,6 +77,7 @@ class Velvet commands << dir_velvetg commands << "-cov_cutoff #{cov_cutoff}" commands << "-exp_cov #{exp_cov}" + commands << "-ins_length #{ins_length}" if paired commands << "-clean yes" execute(commands) @@ -145,6 +146,7 @@ casts << {:long=>'kmer_min', :short=>'k', :type=>'uint', :mandatory=>true, casts << {:long=>'kmer_max', :short=>'K', :type=>'uint', :mandatory=>true, :default=>31, :allowed=>nil, :disallowed=>nil} casts << {:long=>'cov_cutoff', :short=>'c', :type=>'float', :mandatory=>true, :default=>'auto', :allowed=>nil, :disallowed=>nil} casts << {:long=>'exp_cov', :short=>'e', :type=>'float', :mandatory=>true, :default=>'auto', :allowed=>nil, :disallowed=>nil} +casts << {:long=>'ins_length', :short=>'i', :type=>'uint', :mandatory=>false, :default=>700, :allowed=>nil, :disallowed=>nil} casts << {:long=>'clean', :short=>'X', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil} options = Biopieces.options_parse(ARGV, casts) @@ -170,7 +172,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| unless File.size(file_fasta) == 0 velvet = Velvet.new(options[:directory], file_fasta, options[:verbose]) velvet.run_velveth(options[:kmer_min], options[:kmer_max], options[:type]) - velvet.run_velvetg(options[:cov_cutoff], options[:exp_cov]) + velvet.run_velvetg(options[:cov_cutoff], options[:exp_cov], options[:type].match("Paired")) file_contigs = velvet.pick_best_assembly Fasta.open(file_contigs, mode="r") do |fasta_io|