From: martinahansen Date: Wed, 9 Jan 2013 09:38:45 +0000 (+0000) Subject: fixed pair end issue X-Git-Url: https://git.donarmstrong.com/?p=biopieces.git;a=commitdiff_plain;h=d60eb606d5f5f830620a39ea506079fc96a077ee fixed pair end issue git-svn-id: http://biopieces.googlecode.com/svn/trunk@2065 74ccb610-7750-0410-82ae-013aeee3265d --- 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|