]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed pair end issue
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 9 Jan 2013 09:38:45 +0000 (09:38 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 9 Jan 2013 09:38:45 +0000 (09:38 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2065 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/assemble_seq_velvet

index 90cf759b8c82c6fd947c6356a85961c2b20e2c19..d613967586368f3ff377be48987095cbb60ee6d9 100755 (executable)
@@ -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|