From e61e8de1cc4bfb80054174607a81e9d0d47b40d8 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Fri, 2 Mar 2012 11:23:06 +0000 Subject: [PATCH] major upgrade of denoise_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@1759 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/denoise_seq | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bp_bin/denoise_seq b/bp_bin/denoise_seq index 5e67ab8..0129c47 100755 --- a/bp_bin/denoise_seq +++ b/bp_bin/denoise_seq @@ -37,11 +37,13 @@ require 'maasha/align' require 'maasha/usearch' casts = [] -casts << {:long=>'identity', :short=>'i', :type=>'float', :mandatory=>true, :default=>0.97, :allowed=>nil, :disallowed=>nil} -casts << {:long=>'cluster_min', :short=>'c', :type=>'uint', :mandatory=>true, :default=>2, :allowed=>nil, :disallowed=>"0"} -casts << {:long=>'frequency_min', :short=>'f', :type=>'uint', :mandatory=>true, :default=>2, :allowed=>nil, :disallowed=>"0"} -casts << {:long=>'quality_min', :short=>'q', :type=>'uint', :mandatory=>true, :default=>20, :allowed=>nil, :disallowed=>nil} -casts << {:long=>'consensus_min', :short=>'C', :type=>'float', :mandatory=>true, :default=>0.2, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'cluster_ident', :short=>'i', :type=>'float', :mandatory=>true, :default=>0.97, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'cluster_min', :short=>'c', :type=>'uint', :mandatory=>true, :default=>1, :allowed=>nil, :disallowed=>"0"} +casts << {:long=>'sequence_min', :short=>'s', :type=>'uint', :mandatory=>true, :default=>1, :allowed=>nil, :disallowed=>"0"} +casts << {:long=>'residue_min', :short=>'r', :type=>'float', :mandatory=>true, :default=>0.3, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'gap_max', :short=>'g', :type=>'float', :mandatory=>true, :default=>0.4, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'quality_min', :short=>'q', :type=>'uint', :mandatory=>true, :default=>10, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'quality_mean', :short=>'Q', :type=>'uint', :mandatory=>true, :default=>15, :allowed=>nil, :disallowed=>nil} options = Biopieces.options_parse(ARGV, casts) tmpdir = Biopieces.mktmpdir @@ -49,6 +51,8 @@ fastq_file = File.join(tmpdir, "test.fq") fasta_file = File.join(tmpdir, "test.fna") fasta_file_align = File.join(tmpdir, "test.aln.fna") +options[:identity] = options[:cluster_ident] + def alignment_to_fastq(entries, index) entries.each do |entry| cluster, ident, name = entry.seq_name.split('|') -- 2.39.2