#!/usr/bin/perl # Randal R. Ketchem, Ph.D. 619.784.9879 (voice1) # Department of Molecular Biology, MB-9 619.784.8754 (voice2) # The Scripps Research Institute 619.784.9985 (FAX) # 10550 N. Torrey Pines Road ketchemr@scripps.edu (email) # La Jolla, CA 92037-1027 http://www.scripps.edu/~ketchemr # noevio file: ## ATOM A ATOM B BOUND MT AVE +- RMS : per structure # 19 TYR CZ 13 ILE MD 0.01 1D 14.11 +- 1.94 : 15.23 12.39 13.02 11.91 15.81 10.93 17.79 14.76 14.58 14.66 # ar_ambig:1 # The peak number is in the comment field as "peak file name:peak number". if($#ARGV != 0) { $prgName = `basename $0`; chop($prgName); die < out] EOHELP } while(<>) { next if(/^\s*#/); next if(/^\s*$/); chomp; $peakNum = $_; $peakNum =~ s/.*://; $peakNum =~ s/ .*//; $peakCount{$peakNum}++; } foreach $numThisPeak (keys %peakCount) { ++$count{$peakCount{$numThisPeak}}; } print "group: # in this group\n"; foreach $num (sort bynumber keys %count) { print "$num: $count{$num}\n"; } sub bynumber { $a <=> $b; }