#!usr/bin/perl

open (BED, $ARGV[0]);
	while ($line = <BED>){
		$line =~ s/\s+$//;

		@split_tab = split "\t", $line;

		$length = $split_tab[2] - $split_tab[1];
		
		if ($split_tab[6] =~ /71M/){
			$SNP_location = $split_tab[1] + 35;
			print $split_tab[0], "\t",
				$SNP_location, "\t",
				".", "\t";

			$ID = $split_tab[3];
			@split_under = split "_", $ID;
			$Genotype = $split_under[scalar @split_under - 1];
			
			@split_genotype = split "", $Genotype;
	
			foreach $base (@split_genotype){
				if ($base =~ /A|T|G|C/){
					$hash{$base} =$base;
				}
			}
			foreach $key (keys %hash){
				print $key, "\t";
			}
			undef (%hash);
			
			print ".", "\t",
				".", "\t",
				"AB=0;ABP=0;AC=2;AF=1;AN=2;AO=15;CIGAR=1X;DP=15;DPB=15;DPRA=0;EPP=35.5824;EPPR=0;GTI=0;LEN=1;MEANALT=1;MQM=60;MQMR=0;NS=1;NUMALT=1;ODDS=23.0429;PAIRED=1;PAIREDR=0;PAO=0;PQA=0;PQR=0;PRO=0;QA=972;QR=0;RO=0;RPP=35.5824;RPPR=0;RUN=1;SAF=0;SAP=35.5824;SAR=15;SRF=0;SRP=0;SRR=0;TYPE=snp;BVAR", "\t",
				"GT:DP:RO:QR:AO:QA:GL", "\t",
				"1/1:15:0:0:15:972:-10,-4.094,0";

	
			 print "\n";
		}

}
	
