[Bioperl-l] get_nof_contigs returns undef
Wes Barris
wes.barris at csiro.au
Thu Sep 22 23:43:50 EDT 2005
Hi,
The "get_nof_contigs" function does not appear to work. The following code
results in an error when trying to print the number of contigs in the
assembly.
#!/usr/bin/perl -w
use strict;
use Bio::Assembly::IO;
my $usage = "Usage: $0 <infile.ace> <outdir> [cn#]\n";
my $infile = shift or die $usage;
my $io = new Bio::Assembly::IO(-file=>$infile, -format=>'ace');
my $assembly = $io->next_assembly(); # Bio::Assembly::ScaffoldI
my @contigIds = $assembly->get_contig_ids;
my $nContigs = $assembly->get_nof_contigs;
print("Contig IDs: @contigIds\n");
print("N contigs: $nContigs\n");
wes at bioserver> ~/soft/ace/test.pl fasta/cl.00001.fa.cap.ace
Contig IDs: 1
Use of uninitialized value in concatenation (.) or string at /home/wes/soft/ace/test.pl line 11, <GEN0> line 243.
N contigs:
--
Wes Barris
E-Mail: Wes.Barris at csiro.au
More information about the Bioperl-l
mailing list