[Bioperl-l] Basic Error with Bio::Assembly:IO
Smithies, Russell
Russell.Smithies at agresearch.co.nz
Mon Jan 5 17:24:06 EST 2009
Have a look in your .ace file and check the contig name.
I think the regex in the old ace.pm was a bit too specific and would only read files with contigs named Contig1, Contig2, etc.. so if your contig is named "contig1" it will fail.
A quick hack if you only have a few files to do is rename the contigs in your .ace file.
Or tweak the regex at line 142 in ace.pm
Russell
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Abhishek Pratap
> Sent: Tuesday, 6 January 2009 11:09 a.m.
> To: bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] Basic Error with Bio::Assembly:IO
>
> 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}
>
> USAGE
>
>
> 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
> www.igs.umaryland.edu/
>
> Chair
> RSG-Worldwide
> ISCB-Student Council
> http://iscbsc.org/rsg
>
> www.bioinfosolutions.com
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================
More information about the Bioperl-l
mailing list