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}/*")
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)
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)
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|