X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fblat_seq;h=1f327fab0997097901c1d060a46de4edc69062ff;hb=2f0fd91b461033529a4a72e161bd133252a22eb6;hp=073cfd89d0ae8bb92bfaf767949452d88b507a8b;hpb=a8f2b8dbd9d579c56598b63a81cc6275ff4d6609;p=biopieces.git diff --git a/bp_bin/blat_seq b/bp_bin/blat_seq index 073cfd8..1f327fa 100755 --- a/bp_bin/blat_seq +++ b/bp_bin/blat_seq @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Copyright (C) 2007-2009 Martin A. Hansen. +# Copyright (C) 2007-2010 Martin A. Hansen. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -43,16 +43,17 @@ my ( $options, $in, $out, $record, $blat_args, $subject_file, $query_file, $fh_i $options = Maasha::Biopieces::parse_options( [ - { long => 'database', short => 'd', type => 'file', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'genome', short => 'g', type => 'genome', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'fast_map', short => 'f', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'occ', short => 'c', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'intron_max', short => 'i', type => 'uint', mandatory => 'no', default => 750000, allowed => undef, disallowed => undef }, - { long => 'tile_size', short => 't', type => 'uint', mandatory => 'no', default => 11, allowed => undef, disallowed => 0 }, - { long => 'step_size', short => 's', type => 'uint', mandatory => 'no', default => 11, allowed => undef, disallowed => 0 }, - { long => 'min_identity', short => 'm', type => 'uint', mandatory => 'no', default => 90, allowed => undef, disallowed => 0 }, - { long => 'min_score', short => 'M', type => 'uint', mandatory => 'no', default => 0, allowed => undef, disallowed => undef }, - { long => 'one_off', short => 'o', type => 'uint', mandatory => 'no', default => 0, allowed => undef, disallowed => undef }, + { long => 'database', short => 'd', type => 'file', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'genome', short => 'g', type => 'genome', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'fast_map', short => 'f', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'occ', short => 'c', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'intron_max', short => 'i', type => 'uint', mandatory => 'no', default => 750000, allowed => undef, disallowed => undef }, + { long => 'tile_size', short => 't', type => 'uint', mandatory => 'no', default => 11, allowed => undef, disallowed => 0 }, + { long => 'step_size', short => 's', type => 'uint', mandatory => 'no', default => 11, allowed => undef, disallowed => 0 }, + { long => 'min_identity', short => 'm', type => 'uint', mandatory => 'no', default => 90, allowed => undef, disallowed => 0 }, + { long => 'min_score', short => 'M', type => 'uint', mandatory => 'no', default => 0, allowed => undef, disallowed => undef }, + { long => 'one_off', short => 'o', type => 'uint', mandatory => 'no', default => 0, allowed => undef, disallowed => undef }, + { long => 'allow_N_blocks', short => 'N', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, ] ); @@ -74,7 +75,8 @@ $blat_args .= " -minIdentity=$options->{ 'min_identity' }"; $blat_args .= " -minScore=$options->{ 'min_score' }"; $blat_args .= " -stepSize=$options->{ 'step_size' }"; $blat_args .= " -maxIntron=$options->{ 'intron_max' }"; -$blat_args .= " -fastMap" if $options->{ 'fast_map' }; +$blat_args .= " -fastMap" if $options->{ 'fast_map' }; +$blat_args .= " -extendThroughN" if $options->{ 'allow_N_blocks' }; # $blat_args .= " -ooc=" . Maasha::Config::genome_blat_ooc( $options->{ "genome" }, 11 ) if $options->{ 'ooc' }; $tmp_dir = Maasha::Biopieces::get_tmpdir(); @@ -95,7 +97,7 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh_out; -$blat_args .= " -t=dnax" if $type eq "protein"; +$blat_args .= " -t=dnax" if $type eq "PROTEIN"; $blat_args .= " -q=$type"; $result_file = "$tmp_dir/blat.psl";