[Bioperl-l] Bio::Factory::SequenceFactoryI SYNOPSIS example

Adam Sjøgren asjo at koldfront.dk
Fri Apr 11 15:39:59 EDT 2008


On Fri, 11 Apr 2008 11:35:54 -0400, Hilmar wrote:

> On Apr 11, 2008, at 4:53 AM, Adam Sjøgren wrote:

>>> my $seqbuilder = Bio::Seq::SeqFactory->new('type' =>
>>> 'Bio::PrimarySeq');

> You need to prefix the argument with a dash: '-type', not 'type'. 
> Otherwise, it assumes that the class you want instantiated is
> 'type.pm'.

I guess that means I should submit a patch for the SYNOPSIS. Attached.


   Thanks,

    Adam


Index: Bio/Factory/SequenceFactoryI.pm
===================================================================
--- Bio/Factory/SequenceFactoryI.pm	(revision 14654)
+++ Bio/Factory/SequenceFactoryI.pm	(working copy)
@@ -20,7 +20,7 @@
 # get a Bio::Factory::SequenceFactoryI object like
 
     use Bio::Seq::SeqFactory;
-    my $seqbuilder = Bio::Seq::SeqFactory->new('type' => 'Bio::PrimarySeq');
+    my $seqbuilder = Bio::Seq::SeqFactory->new('-type' => 'Bio::PrimarySeq');
 
     my $seq = $seqbuilder->create(-seq => 'ACTGAT',
 				  -display_id => 'exampleseq');

-- 
 "Well, I'm a moon around you"                                Adam Sjøgren
                                                         asjo at koldfront.dk




More information about the Bioperl-l mailing list