#!/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
$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 },
]
);
$subject_file = "$ENV{ 'BP_DATA' }/genomes/$options->{ 'genome' }/fasta/$options->{ 'genome' }.fna";
}
-if ( $options->{ 'fast_map' } )
-{
- $blat_args .= " -fastMap";
-}
-else
-{
- $blat_args .= " -tileSize=$options->{ 'tile_size' }";
- $blat_args .= " -oneOff=$options->{ 'one_off' }";
- $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 .= " -ooc=" . Maasha::Config::genome_blat_ooc( $options->{ "genome" }, 11 ) if $options->{ 'ooc' };
-}
+$blat_args .= " -tileSize=$options->{ 'tile_size' }";
+$blat_args .= " -oneOff=$options->{ 'one_off' }";
+$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 .= " -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();
$query_file = "$tmp_dir/blat.seq";