11 Sep 10:38
difference in opening file from @ARGV and STDIN?
From: Felipe Figueiredo <philsf79 <at> gmail.com>
Subject: difference in opening file from @ARGV and STDIN?
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-09-11 08:40:26 GMT
Subject: difference in opening file from @ARGV and STDIN?
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-09-11 08:40:26 GMT
I'm not sure if this is related to bioperl (Bio::AlignIO) or if it's a
general perl error on my part, but I find strange that the following
code gives differente results depending on how I input the alignment:
--- test.pl ---
#!/usr/bin/perl
use warnings;
use strict;
use Bio::AlignIO;
my $file;
if (@ARGV) {
$file = shift @ARGV;
}
else {
$file = "-";
}
my $align = Bio::AlignIO->new(-file=>$file)->next_aln;
printf "Sequences: %s\n",$align->no_sequences;
--- test.pl ---
If I run this using a file containing 4 sequences, the following
hapens:
--- run tests ---
$ ./test.pl exemplo-alinhamento.fasta
(Continue reading)
RSS Feed