Make this INSTALL match the page on the Web site
[bioperl-live.git] / examples / cluster / dbsnp.pl
blob41528ec76ca0c4565f124c8a8b41252acf53d0a0
1 #!/usr/bin/perl
3 # allenday@ucla.edu
4 # parses a dbsnp xml file, prints some info for each refsnp and subsnp
6 use strict;
7 use Bio::ClusterIO;
8 use Bio::Root::IO;
9 use IO::File;
11 my $file = shift @ARGV;
13 my $io = Bio::ClusterIO->new ( -tempfile => 0,
14 -format => 'dbsnp',
15 -fh => IO::File->new("zcat $file |"),
18 while(my $cluster = $io->next_cluster){
19 print $cluster->id,"\t", $cluster->observed, "\n";
21 foreach my $subsnp ($cluster->each_subsnp){
22 print "\t\t\t", $subsnp->id, "\t", $subsnp->handle, "\t", $subsnp->method, "\n";