4 use Hash
::Case
::Preserve
;
7 my $equivalence_file = shift;
10 open(my $E, "<", $equivalence_file) || die "Can't open $equivalence_file\n";
12 tie
my %ids, 'Hash::Case::Preserve';
16 my ($original_id, $modified_id, $new_id, $match_type, $stock_type) = split /\t/;
17 $ids{$original_id} = $new_id;
22 open(my $V, "<", $vcf_file) || die "Can't open $vcf_file\n";
27 if ($_ =~ m/^\#CHROM/) {
28 print STDERR
"Parsing ids in vcf file...\n";
33 if (exists($ids{$f}) && ($ids{$f} ne $f)) {
34 print STDERR
"replace $f with $ids{$f} ($count), ";
38 my $line = join("\t", @F);