[Bio] / FigMetagenomeTools / venn2.pl Repository:
ViewVC logotype

Annotation of /FigMetagenomeTools/venn2.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : olson 1.1 #!/usr/bin/perl -w
2 :    
3 :     # create some more venn diagram data. But better.
4 :    
5 :     use strict;
6 :    
7 :     my @files=@ARGV;
8 :     die "$0 <list of files>" unless ($ARGV[0]);
9 :    
10 :     my $count; my $revcount;
11 :     foreach my $f (@files) {
12 :     open(IN, $f) || die "Can't open $f";
13 :     while (<IN>) {
14 :     my @a=split /\t/;
15 :     $count->{$a[1]}->{$f}++;
16 :     $revcount->{$f}->{$a[1]}++;
17 :     }
18 :     }
19 :    
20 :    
21 :     while (@files) {
22 :     my $t=shift(@files);
23 :     print "There are ", scalar(keys %{$revcount->{$t}}), " subsystems in $t\n";
24 :     foreach my $f (@files) {
25 :     my $compare=0;
26 :     foreach my $ss (keys %{$revcount->{$t}}) {if ($count->{$ss}->{$f}) {$compare++}}
27 :     print "There are $compare subsystems in $t and $f\n";
28 :     }
29 :     }
30 :    
31 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3