[Bioperl-l] Errors using Bio::Assembly

nkuipers nkuipers at uvic.ca
Fri Jan 31 13:32:49 EST 2003


I just started using this module today, and had no problems...admittedly, my 
script is MUCH lighter than yours but no errors were thrown with the 
next_assembly() call anyways.  I am using Linux Red Hat 8.0, Perl 5.8.0, 
bioperl 1.2.

# # # # # #

use strict;
use warnings;

use lib qw(/home/nkuipers/lib);
use Bio::Assembly::IO;
use Fcntl ":flock";

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

my $assembly = $io->next_assembly;

#collection of Bio::Assembly::Contig objects
my $contigs = $assembly->{_contigs};

open CLUSTERS, ">>entropyFiltered.clust" or die "Could not open for 
append.\n";
flock(CLUSTERS, LOCK_EX)		 or die "LOCK_EX refused.\n";

for my $id (sort {$a <=> $b} keys %$contigs)
{
	#this format is easy to split into a hash of arrays later on

	print CLUSTERS "$id=[qw(";
	my $elemref = $contigs->{$id}->{_elem};
	print CLUSTERS "$_ " for sort {$a <=> $b} keys %$elemref;
	print CLUSTERS ")]\n";
}

__END__


>===== Original Message From Andy Nunberg <anunberg at oriongenomics.com> =====
>I have tried the new Bio::Assembly module and I get a few errors...
>using RH Linux 7.2 with Perl 5.6
>
>first here is the script i am using...
>use lib '/loginhome/anunberg/bioperl-1.2';
>use strict;
>use Bio::Assembly::IO;
>use Bio::Assembly::ContigAnalysis;
>use Carp qw(cluck);
>my $in=Bio::Assembly::IO->new(-file=>$ARGV[0], -format=>'ace');
>my $assembly=$in->next_assembly;
>my @contigs=$assembly->all_contigs;
>
>foreach my $contig(@contigs){
>
>	my $analysis=Bio::Assembly::ContigAnalysis->new(-contig=>$contig);
>	my @hqd=$analysis->high_quality_discrepancies;
>	my @ss=$analysis->single_strand;
>	my @lcd=$analysis->low_consensus_quality;
>	my $id=$contig->id;
>	print "$id\t";
>	print scalar @hqd."\t";
>	print scalar @lcd."\n";
>}
>
>My first error is when calling the next_assembly method.  Some parsing
>error occurs, I think.  I got mutlitiple warnings all the same
>Argument "" isn't numeric in numeric comparison (<=>) at
>/loginhome/anunberg/bioperl-1.2/Bio/SeqFeature/Collection.pm line 436,
><GEN0> line 54.
>the lines correspond to the QA tag lines in the ace file.  Sometimes the
>same complaint occurs one line above it if its blank, but not all blank
>lines above the QA tag produce this warning
>
>when using the method high_quality_discrepancies, i get this warning
>Argument "" isn't numeric in numeric comparison (<=>) at
>/loginhome/anunberg/bioperl-1.2/Bio/SeqFeature/Collection.pm line 436,
><GEN0> line 358.
>which is a blank line at the end of the ace file.
>
>I may be using the method wrong, but using an ace file where i know to have
>a high quality descrepancie, i still get 0 .
>The documentation is a little off for this method.  The description says
>that a Bio::SeqFeature::Collection is returned, but the code and the
>example has an array of Bio::SeqFeature::Generic objects being returned(if
>i am reading the code correctly).
>
>
>
>the single_strand method gives me the following exception
>------------- EXCEPTION Bio::Root::NotImplemented -------------
>MSG: Abstract method
>"Bio::Assembly::ContigAnalysis::_merge_overlapping_features" is not
>implemented by package Bio::Assembly::ContigAnalysis.
>This is not your fault - author of Bio::Assembly::ContigAnalysis should be
>blamed!
>
>STACK Bio::Root::RootI::throw_not_implemented
>/loginhome/anunberg/bioperl-1.2/Bio/Root/RootI.pm:529
>STACK Bio::Assembly::ContigAnalysis::_merge_overlapping_features
>/loginhome/anunberg/bioperl-1.2/Bio/Assembly/ContigAnalysis.pm:476
>STACK Bio::Assembly::ContigAnalysis::single_strand
>/loginhome/anunberg/bioperl-1.2/Bio/Assembly/ContigAnalysis.pm:442
>STACK toplevel ../testing_BioAssembly.pl:31
>
>---------------------------------------------------------------
>
>Thanks to anyone who can help.
>Andy
>
>*******************************************************************
>Andy Nunberg, Ph.D
>Computational Biologist
>Orion Genomics, LLC
>(314) 615-6989
>http://www.oriongenomics.com
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at bioperl.org
>http://bioperl.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list