#! /usr/bin/perl # Time-stamp: <2004-10-27 11:18:34 kasper> use warnings; use strict; use Getopt::Long; use Bio::SeqIO; use constant USAGE =>< \$help, "format=s" => \$format, ) or die USAGE; $help and die USAGE; @ARGV = ('-') unless @ARGV; my $input = shift @ARGV; open my $in, "$input" or die "$input: $!\n"; @ARGV = ('>&STDOUT') unless @ARGV; my $output = shift @ARGV; open my $out, ">$output" or die "$output: $!\n"; # Create a SeqIO obj. for input: $in = Bio::SeqIO->newFh(-fh => $in, -format => $format ); # Create a the output file handle: $out = Bio::SeqIO->newFh(-fh => $out, -format => $format ); while (<$in>) { print $out $_; } =head1 SYNOPSIS: seqfiletest.pl [OPTIONS] [infile [outfile]] =head1 DESCRIPTION: This script tests wether a created sequence file can be read and written by the Bio::SeqIO obj. That is, whether it is syntactically correct (in Bioperl's point of view). =head1 OPTIONS: =over 4 =item --format Format of inputfile. =item --help Prints this help. =back =head1 EXAMPLES: cat file.embl | seqfiletest.pl seqfiletest.pl file.embl =head1 AUTHOR: Kasper Munch =head1 COPYRIGHT: This program is free software. You may copy and redistribute it under the same terms as Perl itself. =cut