[Bioperl-l] Basic Error with Bio::Assembly:IO

Abhishek Pratap abhishek.vit at gmail.com
Mon Jan 5 17:09:05 EST 2009

Hi All

I am new to Bio::Assembly and the way it is implemented. I am simply reading
an ACE file and getting an error .
here is the script

Can't call method "get_consensus_sequence" on an undefined value at
/usr/lib/perl5/vendor_perl/5.8.8/Bio/Assembly/IO/ace.pm line 167, <GEN0>
line 163.

Here is the script .


#!/usr/local/bin/perl -w

my $PROGNAME="$0";

#my ($infile, $io, $usage

###Required Modules
use strict;
use Bio::Assembly::IO;
use Bio::AlignIO;
use Bio::SeqIO;

my $usage = <<USAGE;

    $PROGNAME {acefile name with full path}


    my $infile = shift or die $usage;

my $io = Bio::Assembly::IO->new(-file=>"$infile", -format=>"ace");

#print "IO is $io\n ";

my $assembly=$io->next_assembly(); ### Pointing to Bio::Assembly::Scaffold1

#print "Assembly : $assembly";

foreach my $contig ($assembly->all_contigs())  ##Bio::Assembly::Contig


              my $contigName=$contig->id;
              print "Contig Name is \t $contigName";



Abhishek Pratap
Bioinformatics Software Engineer
Institute for Genome Sciences
School of Medicine, Univ of Maryland
801, W. Baltimore Street, Baltimore, MD 21209
Ph: (+1)-410-706-2296

ISCB-Student Council


More information about the Bioperl-l mailing list