[Bioperl-l] different syntaxes for SeqI constructor and Factory constructor?
lzhtom at hotmail.com
Wed Dec 6 22:13:47 EST 2006
Recently I found this:
For constructing a new SeqI object, I had to write:
-file => '/home/myfile',
-format => 'Fasta'); #Note the dash before the two
If I omitted the dash:
file => '/home/myfile',
format => 'Fasta');
I'd get error:
MSG: Unknown format given or could not determine it 
STACK Bio::SeqIO::new /usr/lib/perl5/site_perl/5.8.7/Bio/SeqIO.pm:377
So it seems to me that the dashes before the arguments are essential.
However, when I tried to build a factory for StandaloneBlast, I found the
other way around.
If the script had the dash:
-program => 'blastn',
-database => '/home/mydatabase');
I'd get the error message:
MSG: Unallowed parameter: - !
If I left out the dash by saying:
program => 'blastn',
database => '/home/mydatabase');
Everyting is fine.
Now I'm confused. Why sometimes I have to add the dash, while sometimes I'm
not allowed to?
Thanks in advance!
ÓëÁª»úµÄÅóÓÑ½øÐÐ½»Á÷£¬ÇëÊ¹ÓÃ MSN Messenger: http://messenger.msn.com/cn
More information about the Bioperl-l