Skip to content

Commit

Permalink
Add -seqtype param
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborne committed Sep 30, 2011
1 parent f2c95e1 commit 4173eae
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions lib/Bio/Tools/Run/Alignment/Muscle.pm
@@ -1,4 +1,3 @@
# $Id$
#
# BioPerl module for Bio::Tools::Run::Alignment::Muscle
#
Expand Down Expand Up @@ -126,7 +125,7 @@ use Bio::Tools::Run::WrapperBase;

BEGIN {
%DEFAULTS = ( 'AFORMAT' => 'fasta' );
@MUSCLE_PARAMS = qw(IN OUT TREE1 LOG LOGA SCOREFILE GAPOPEN
@MUSCLE_PARAMS = qw(IN OUT TREE1 LOG LOGA SCOREFILE GAPOPEN SEQTYPE
MAXMB MAXHOURS MAXITERS KBAND IN1 IN2 USETREE USETREE_NOWARN);
@MUSCLE_SWITCHES = qw(QUIET DIAGS REFINE STABLE GROUP
CLW CLWSTRICT MSF);
Expand Down Expand Up @@ -524,36 +523,36 @@ sub _setinput {

sub _setparams {
my ($self) = @_;
my ($attr, $value,$param_string);
my ( $attr, $value, $param_string );
$param_string = '';
my $laststr;
for $attr ( @MUSCLE_PARAMS ) {
$value = $self->$attr();
next unless (defined $value);
my $attr_key = lc $attr;
$attr_key = ' -'.$attr_key;
$param_string .= $attr_key .' '.$value;

for $attr (@MUSCLE_PARAMS) {
$value = $self->$attr();
next unless ( defined $value );
my $attr_key = lc $attr;
$attr_key = ' -' . $attr_key;
$param_string .= $attr_key . ' ' . $value;
}
for $attr ( @MUSCLE_SWITCHES) {
$value = $self->$attr();
next unless ($value);
my $attr_key = lc $attr; #put switches in format expected by tcoffee
$attr_key = ' -'.$attr_key;
$param_string .= $attr_key ;
for $attr (@MUSCLE_SWITCHES) {
$value = $self->$attr();
next unless ($value);
my $attr_key = lc $attr; # put switches in format expected by tcoffee
$attr_key = ' -' . $attr_key;
$param_string .= $attr_key;
}

# Set default output file if no explicit output file selected
unless ($self->outfile_name ) {
my ($tfh, $outfile) = $self->io->tempfile(-dir=>$self->tempdir());
close($tfh);
undef $tfh;
$self->outfile_name($outfile);
unless ( $self->outfile_name ) {
my ( $tfh, $outfile ) = $self->io->tempfile( -dir => $self->tempdir() );
close($tfh);
undef $tfh;
$self->outfile_name($outfile);
}
$param_string .= " -out ".$self->outfile_name;
if ($self->quiet() || $self->verbose < 0) {
$param_string .= ' 2> /dev/null';
$param_string .= " -out " . $self->outfile_name;

if ( $self->quiet() || $self->verbose < 0 ) {
$param_string .= ' 2> /dev/null';
}
return $param_string;
}
Expand Down

0 comments on commit 4173eae

Please sign in to comment.