#!/usr/bin/perl #use strict; #use warnings; die "usage:perl $0 outputDir tumor" if @ARGV!=2; my (${outputDir},${tumor})=@ARGV; open L,"${outputDir}/mutation/hotspot/${tumor}.hotspot.L.snp.indel.vcf"; open H,"${outputDir}/mutation/hotspot/${tumor}.hotspot.H.snp.indel.vcf"; my %high; my %low; my @head; while(){ if(/^#/){ push @head,$_; }else{ my @line=split; $low{"$line[0]_$line[1]"}=$_; } } while(){ unless(/^#/){ my @line=split; $high{"$line[0]_$line[1]"}=$_; } } my @content; foreach my $key(keys %low){ if(not exists $high{$key}){ push @content,$low{$key}; } } if (@content){ open OUT,">${outputDir}/mutation/hotspot/${tumor}.hotspot.snp.indel.vcf"; print OUT @head; print OUT @content; }