From 1c3f2be8297a4890789b56ff7c8645d14bb2541d Mon Sep 17 00:00:00 2001 From: kiran Date: Tue, 17 Aug 2010 22:19:13 +0000 Subject: [PATCH] Change for Chris: don't depend on other Perl modules. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4053 348d0f76-0448-11de-a6fe-93d51630548a --- perl/AnnotateVCFwithMAF.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/perl/AnnotateVCFwithMAF.pl b/perl/AnnotateVCFwithMAF.pl index 1e5dc2363..9603dc6e5 100755 --- a/perl/AnnotateVCFwithMAF.pl +++ b/perl/AnnotateVCFwithMAF.pl @@ -1,11 +1,19 @@ #!/usr/bin/perl -w use strict; -use lib "$ENV{'STING_DIR'}/perl"; -use StingArgs; -use Data::Dumper; -my %args = &getCommandArguments("VCF_IN" => undef, "MAF_IN" => undef, "VCF_OUT" => "/dev/stdout"); +sub usage { + print "Usage: $0 \n"; + print "This program takes an annotated MAF file and propagates the annotations to the VCF file.\n"; + exit(1); +} + +my %args; +($args{'VCF_IN'}, $args{'MAF_IN'}, $args{'VCF_OUT'}) = @ARGV; + +if (!defined($args{'VCF_IN'}) || !defined($args{'MAF_IN'}) || !defined($args{'VCF_OUT'})) { + &usage(); +} my %ignoreEntries = ( 'normal_barcode' => 1, @@ -37,13 +45,10 @@ while (my $mafline = ) { my $locus = "$mafentry{'chr'}:$mafentry{'start'}"; if (exists($mafentry{$locus})) { print "Locus $locus already spoken for!\n"; - print Dumper(\%mafentry); exit(1); } $maf{$locus} = \%mafentry; - - #print Dumper(\%mafentry); } close(MAF_IN);