From 4965d6b26a443fb6d6cacfbceea781b652fdec34 Mon Sep 17 00:00:00 2001 From: kshakir Date: Wed, 17 Mar 2010 19:08:37 +0000 Subject: [PATCH] Passing just the single alternate allele to the converted maf on the recommendation of mike lawrence and kiran. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3026 348d0f76-0448-11de-a6fe-93d51630548a --- .../maf_annotation/vcf_to_germline_maflite.pl | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/perl/maf_annotation/vcf_to_germline_maflite.pl b/perl/maf_annotation/vcf_to_germline_maflite.pl index e767fc71c..fadd98753 100755 --- a/perl/maf_annotation/vcf_to_germline_maflite.pl +++ b/perl/maf_annotation/vcf_to_germline_maflite.pl @@ -11,33 +11,8 @@ my $line; while (defined($line = )) { if ($line =~ /#/) { next; } - my ($chrom, $pos, $rsName, $ref, $alt, $qual, $filter, $info, $format, $sampleA) = split("\t", $line); - - my ($genoNum) = split(":", $sampleA); - my ($geno1, $geno2) = split("/",$genoNum); - - my $allele1 = "N"; - my $allele2 = "N"; - if ( $geno1 eq "0") { - $allele1 = $ref; - } elsif ($geno1 eq "1") { - $allele1 = $alt; - } elsif ($geno1 eq ".") { - # do nothing - just leave the N in place - } else { - die("allele1: only handled single alt currently:\n$line \n"); - } - - if ( $geno2 eq "0") { - $allele2 = $ref; - } elsif ($geno2 eq "1") { - $allele2 = $alt; - } elsif ($geno2 eq ".") { - # do nothing - just leave the N in place - } else { - die("allele2: only handled single alt currently:\n$line\n"); - } + my ($chrom, $pos, $rsName, $ref, $alt) = split("\t", $line); my $ncbiBuild = "36"; - print join("\t", ($ncbiBuild, $chrom, $pos, $pos, $ref, $allele1, $allele2, $normalAlias, $normalAlias)) . "\n"; + print join("\t", ($ncbiBuild, $chrom, $pos, $pos, $ref, $alt, $alt, $normalAlias, $normalAlias)) . "\n"; }