X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fblast_seq;h=be2b8163cd99bdc6e2f9f7f8da14d4f4bda37a0f;hb=49915827e5d35284f24e7149d039478abd1e2139;hp=de78c35d4a2c1419027617068e2257f1c8f8452d;hpb=68b0d2096e200e63bb06f1e20c04761ddb9bc68b;p=biopieces.git diff --git a/bp_bin/blast_seq b/bp_bin/blast_seq index de78c35..be2b816 100755 --- a/bp_bin/blast_seq +++ b/bp_bin/blast_seq @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # Copyright (C) 2007-2009 Martin A. Hansen. @@ -26,6 +26,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::Common; @@ -37,16 +38,20 @@ use Maasha::Fasta; my ( $options, $in, $out, $tmp_dir, $tmp_in, $tmp_out, $q_type, $s_type, $record, $entry, - $fh_in, $fh_out, $program ); + $fh_in, $fh_out, $progs_ok, $program ); + +$progs_ok = 'blastn,blastp,tblastn,blastx,tblastx'; $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 => 'program', short => 'p', type => 'string', mandatory => 'no', default => undef, allowed => 'blastn,blastp,tblastn,blastx,tblastx', disallowed => undef }, - { long => 'e_val', short => 'e', type => 'float', mandatory => 'no', default => 10, allowed => undef, disallowed => undef }, - { long => 'filter', short => 'f', type => 'string', mandatory => 'no', default => 'no', allowed => 'yes,no', disallowed => undef }, - { long => 'cpus', short => 'c', type => 'uint', mandatory => 'no', default => 1, allowed => undef, disallowed => 0 }, + { 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 => 'program', short => 'p', type => 'string', mandatory => 'no', default => undef, allowed => $progs_ok, disallowed => undef }, + { long => 'e_val', short => 'e', type => 'float', mandatory => 'no', default => 10, allowed => undef, disallowed => undef }, + { long => 'filter', short => 'f', type => 'string', mandatory => 'no', default => 'no', allowed => 'yes,no', disallowed => undef }, + { long => 'cpus', short => 'c', type => 'uint', mandatory => 'no', default => 1, allowed => undef, disallowed => 0 }, + { long => 'no_gaps', short => 'G', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'megablast', short => 'm', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, ] ); @@ -88,6 +93,18 @@ if ( $options->{ 'filter' } eq 'yes' ) { $options->{ 'filter' } = 'F'; } +if ( $options->{ 'no_gaps' } ) { + $options->{ 'gapped' } = 'F'; +} else { + $options->{ 'gapped' } = 'T'; +} + +if ( $options->{ 'megablast' } ) { + $options->{ 'megablast' } = 'T'; +} else { + $options->{ 'megablast' } = 'F'; +} + if ( $options->{ 'verbose' } ) { Maasha::Common::run( @@ -96,6 +113,8 @@ if ( $options->{ 'verbose' } ) "-p $program", "-e $options->{ 'e_val' }", "-a $options->{ 'cpus' }", + "-g $options->{ 'gapped' }", + "-n $options->{ 'megablast' }", "-m 8", "-i $tmp_in", "-d $options->{ 'database' }",