[Bioperl-l] sh: 1: Syntax error: "(" unexpected

Antony03 antony.vincent.1 at ulaval.ca
Sat Mar 9 03:56:59 UTC 2013


Hi!

I'm trying to use emboss program (water or needle) with a bioperl script. I
got this error when I try the script: sh: 1: Syntax error: "(" unexpected

Here is the script:

#!/usr/bin/perl 

 # get an EMBOSS factory
  use Bio::Factory::EMBOSS;
  use Bio::AlignIO;
  use Bio::SeqIO;
  $f = Bio::Factory::EMBOSS -> new();
  # get an EMBOSS application  object from the factory
  $water = $f->program('water');
    $inputfilename = "krt1.fasta";
    $seq_to_test  = Bio::SeqIO->new(-file => $inputfilename ,
                             '-format' => 'fasta');

    $inputfilename2 = "krt2.fasta";
    @seqs_to_check  = Bio::SeqIO->new(-file => $inputfilename2 ,
                             '-format' => 'fasta');
  # here is an example of running the application -
  # water can compare 1 sequence against 1 or more sequences
  # in a database using Smith-Waterman
  #this would be a list of seqs to compare 
                       # (could be just 1)
  my $wateroutfile = 'out.water';
  $water->run({-sequences => $seq_to_test,
               -seqall    => \@seqs_to_check,
               -gapopen   => '10.0',
               -gapextend => '0.5',
               -outfile   => $wateroutfile});
  # now you might want to get the alignment
  
  my $alnin = Bio::AlignIO->new(-format => 'emboss',
                                       -file   => $wateroutfile);

  while ( my $aln = $alnin->next_aln ) {
      # process the alignment -- these will be Bio::SimpleAlign objects
  }

Have you an idea of what can do this error?

Thanks!
-- 
View this message in context: http://old.nabble.com/sh%3A-1%3A-Syntax-error%3A-%22%28%22-unexpected-tp35154292p35154292.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.




More information about the Bioperl-l mailing list