[Bioperl-l] Assembly error when parsing .ace files

Wes Barris wes.barris at csiro.au
Thu Sep 22 21:19:50 EDT 2005


Hi,

I have a .ace (and associated files) that I want to parse with bioperl.
The following code produces the displayed error when run:

#!/usr/bin/perl -w
use strict;
use Bio::Assembly::IO;
my $usage = "Usage: $0 <infile.ace>\n";
my $infile = shift or die $usage;
my $io = new Bio::Assembly::IO(-file=>$infile, -format=>'ace');
my $assembly = $io->next_assembly();

Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Bio/Assembly/IO/ace.pm line 392, <GEN1> line 1.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Bio/Assembly/IO/ace.pm line 392, <GEN1> line 2.

The problem is in the following code fragment from ace.pm:

           my ($phdfilename,$chromatfilename);
           if ($seq->desc() =~ /PHD_FILE: (\S+)/) {
               $phdfilename = $1;
           }
           if ($seq->desc() =~ /CHROMAT_FILE: (\S+)/)  {
                $chromatfilename = $1;
           }
           (my $phdfile = $singletsfilename) =~ s/edit_dir.*//;
           $phdfile .= "phd_dir/$phdfilename";

The above code is reading the .singlets file and looking for the string
"PHD_FILE:" in the defline.  That string does not exist in my singlets
deflines.  My .ace (and associated files) are created using the cap3
application.

Perhaps ace.pm should be modified to gracefully handle the case where
singlet deflines do not contain the "PHD_FILE:" string.

I am running a CVS version of bioperl updated on Sep 22 on a Linux
RHEL 4.1 system.  Perl version 5.8.5.  The defline of my singlet file
is:

 >BF654941 11920073 | BF654941.1 CLONE: unknown CLONE_LIB: MARC 3BOV LEN: 491 bp FILE: 284.fa 5-PRIME DEFN: 279305 MARC 3BOV Bos taurus cDNA 5', mRNA sequence. tissuetype=[pooled] organism=[Bos taurus]

-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au


More information about the Bioperl-l mailing list