[Bioperl-l] Need help using AlignIO

Jason Stajich jason.stajich at duke.edu
Mon Mar 7 13:56:01 EST 2005


You are not providing the input file so no alignments are being read in

my $in  = Bio::AlignIO->new();

Should be
# or whatever format you have it stored in.
my $in  = Bio::AlignIO->new(-file => 'filename.aln', -format => 
'fasta');
Or if you want it to be the cmdline you need to specify it
my $in = Bio::AlignIO->new(-file => shift @ARGV, -format => 'fasta');

If you wanted to revert to the old behavior (> Bioperl 1.2) where 
either cmdline or STDIN would be re-directed as input you need the 
special ARGV handle.

my $in  = Bio::AlignIO->new(-fh => \*ARGV, -format => 'fasta'); # or 
whatever format you have it in, can't mix formats...


--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/

On Mar 7, 2005, at 1:27 PM, Ned Young wrote:

> Hi,
>
> I must not be using AlignIO right, for when I try to read in an 
> alignment and then output it to a file, I get an empty file.
>
> I'm trying to write a script for the design of multiplex SNP primers, 
> and, after looking at several modules, thought that AlignIO would be 
> good.
>
> Can someone give me a pointer?  Here's a trimmed down version of my 
> script, to show the problem, as well as the input file I've been 
> using.  I run the script by typing:
> ./test3.pl test.fasta
>
> <test3.pl><test.fasta>
>
> Any other modules I should look at?
>
> Yours truly,
>
> Ned Young	
> Department of Biomedical Sciences
> Division of Infectious Diseases
> Tufts University School of Veterinary Medicine
> 200 Westboro Rd.
> N. Grafton, MA 01536
> 508-887-4540
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20050307/14136e2b/PGP.bin


More information about the Bioperl-l mailing list