[Bioperl-l] Trouble with Clustalw
Michael Rosen
eigenrosen at gmail.com
Thu Aug 6 07:12:24 UTC 2009
I'm a complete bioperl novice, trying to do Clustalw on some fasta
files, and am running into trouble:
~/454DATA> perl TestClust BlastedReads/A0220B0939all.fasta
Use of uninitialized value in concatenation (.) or string at /usr/
pubsw/lib/perl5/site_perl/5.8.8/Bio/Tools/Run/Alignment/Clustalw.pm
line 550.
Use of uninitialized value in concatenation (.) or string at /usr/
pubsw/lib/perl5/site_perl/5.8.8/Bio/Tools/Run/Alignment/Clustalw.pm
line 551.
Can't exec "align": No such file or directory at /usr/pubsw/lib/perl5/
site_perl/5.8.8/Bio/Tools/Run/Alignment/Clustalw.pm line 555.
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Clustalw call ( align -infile=/tmp/6g7vpegtdP/tBlfRYOnKf -
output=gcg -outfile=/tmp/6g7vpegtdP/4WWjuhKS3p) crashed: -1
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/pubsw/lib/perl5/site_perl/5.8.8/Bio/
Root/Root.pm:328
STACK: Bio::Tools::Run::Alignment::Clustalw::_run /usr/pubsw/lib/perl5/
site_perl/5.8.8/Bio/Tools/Run/Alignment/Clustalw.pm:556
STACK: Bio::Tools::Run::Alignment::Clustalw::align /usr/pubsw/lib/
perl5/site_perl/5.8.8/Bio/Tools/Run/Alignment/Clustalw.pm:472
STACK: TestClust:22
-----------------------------------------------------------
Here's my code:
#!/usr/bin/perl -w
use Bio::Perl;
use Bio::AlignIO;
use Bio::Tools::Run::Alignment::Clustalw;
use Bio::SimpleAlign;
use Bio::Seq;
use strict;
use warnings;
my $factory = Bio::Tools::Run::Alignment::Clustalw->new();
my @seq_array = read_all_sequences($ARGV[0],'fasta');
for (my $i = 0; $i < @seq_array; $i++){
(my $seq = $seq_array[$i]->seq()) =~ s/-//g;
$seq_array[$i]->seq($seq);
}
write_sequence(">test",'fasta', at seq_array);
my $seq_array_ref = \@seq_array;
my $aln = $factory->align($seq_array_ref);
my @align_array = $aln->each_seq();
write_sequence(">testfile",'fasta', at align_array);
The loop is just there to take out some gaps that were placed in a
blast previous to this. The write_sequence call confirms that
@seq_array is a valid array of Bio:Seq objects at the time align calls
it. Here's some output in "test":
>A0220B0939one.1 FV584Q101DEWY9
TAAAGGAGCGGTTCACTTCCCGCAGCCCGGCTACCAAGTATTCATCGAGGGGGCCGGTGC
CACCCGCAACCAGGGAATAGGTGATGAAGCGGAGGTAGTAGCCGATGTCGCGGGCACACT
TGGCCTGAAACACATCGCCGTGGCCCATTTCACCCGGCTGGGTCAAGTAAGGGAACCTCT
TGAACACTTCCTGCACCGCTTCCCGCACCAGGGTTTGCTGATTGTTGGTTAGGACACGGG
CCGCTTCCAGAGAAGCAGCAGCACGCTGGTAACGACCATTCACGGCCTGCAGCTCGCTGG
CATTCAGAAAACGCCCTTGATTGTCAGCGGCAGCAATCGCTTCAGTGATGACGGTTTTCA
CCTTGCAACTCCTAAATTCATCAATTGTGTTGTTAACGAACATTCTGTAGGAAAGGCGGA
CTGGATCTCCACCTGCCTATCAGAAATGAAGGGATCTAACCGATCTAAAAAGGGACGACT
AAGCCAGCTTCGACCCAAAGCTCAAACGATGGCG
>A0220B0939one.2 FV584Q101A4DG7
TCGAGGGGGCCGGTGCCACCCGCAACCAGGGAATAGGTAATGAAGCGGAGGTAGTAGCCG
ATGTCGCGGGCACACTTGGCCTGAAACACATCGCCGTGGCCCATTTCCCCCGGCTGGGTC
AAGTAAGGGAACCTCTTGAACACTTCCTGCACCGCTTCCCGCACCAGGGTTTGCTGATTG
TTGGTTAGGACACGGGCCGCTTCCAGAGAAGCAGCAGCACGCTGGTAACGACCATTCACG
GCCTGCAGCTCGCTGGCATTCAGAAAACGCCCTTGATTGTCAGCGGCAGCAATCGCTTCA
GTGATGACGGTTTTCACCTTGCAACTCCTAAATTCATCAATTGTGTTGTTAACGAACATT
CTGTAGGAAAGGCGGACTGGATCTCCACCTGCCTATTAGAAATGAAGGGATCTAACCGAT
CTAAAAAGGACGACTAAGCCAGCTTCGACCCAAAGCTCAAACGATGGCGGCAGCAGCCTT
ATCGAAGTAGCTGGCCACTTCGCTTTGCAGCG
...
Thanks,
Mike
More information about the Bioperl-l
mailing list