#!/usr/bin/perl -w
use strict;

my $fh;
my %cons;
my %done;
my @files = @ARGV;
if (!@files) {
   print "USAGE computeDiseaseAssocCons variantsInMostCons.hg17.txt [more.txt ..]\n";
   exit 1;
}
foreach my $f (@files) {
   open ($fh, $f) or die "Couldn't open $f, $!\n";
   while (<$fh>) {
       chomp;
       my @f = split(/\t/);
       $cons{$f[3]} = 1;
   }
   close $fh or die "Couldn't close $f, $!\n";
}

#HARDCODED name for done variants file
open ($fh, "gvWithDiseaseStatus.txt") or die "Couldn't open gvWithDiseaseStatus, $!\n";
while (<$fh>) {
    chomp;
    $done{$_} = 1;
}
close $fh or die "Couldn't close gvWithDiseaseStatus, $!\n";

foreach my $id (keys %cons) {
   if (!exists $done{$id}) { 
       print "$id\tdisease\tlikely to be phenotype-associated\n";
       $done{$id} = 1;
   }
}

exit;
