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
This commit is contained in:
kshakir 2010-03-17 19:08:37 +00:00
parent 182f1061ff
commit 4965d6b26a
1 changed files with 2 additions and 27 deletions

View File

@ -11,33 +11,8 @@ my $line;
while (defined($line = <STDIN>)) {
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";
}