badFile = 'unparsedARdb.txt';
my $converter = '../convert_coors2';

#my $geneFile = 'M20132.psl';
my $geneFile = "M20132.$build.psl";
my $faFile = 'M20132.fa';
my $strand;
my %aa = (
'Ala' => 'A',
'Val' => 'V',
'Leu' => 'L',
'Ile' => 'I',
'Pro' => 'P',
'Phe' => 'F',
'Trp' => 'W',
'Met' => 'M',
'Gly' => 'G',
'Ser' => 'S',
'Thr' => 'T',
'Cys' => 'C',
'Tyr' => 'Y',
'Asn' => 'N',
'Gln' => 'Q',
'Asp' => 'D',
'Glu' => 'E',
'Lys' => 'K',
'Arg' => 'R',
'His' => 'H',
'Stop' => 'X'
);
my $fh;
my $fh2;
my $fh3;
my $fh4;
my $bfh;
open($fh, ">", $genomeVarFile) or die "Couldn't open output file, $!\n";
open($fh2, ">", $posFile) or die "Couldn't open output file2, $!\n";
#no links for now
open($fh3, ">", $linkFile) or die "Couldn't open output file3, $!\n";
open($fh4, ">", $attFile) or die "Couldn't open output file4, $!\n";
open($bfh, ">", $badFile) or die "Couldn't open output fileb, $!\n";
my $fcnt = 0;
my $bcnt = 0;
my $verCnt = 0;
my %pheno;
my %phenoId; #phenotype and ID to make unique?
my %disease;  #only set disease-associated once

print "Writing files $genomeVarFile, $posFile, $attFile and $bad
badFile =' unparsedARdb.txt'; 
 my $ converter ='.. /convert_coors2'; 

 # my $ geneFile =' M20132.psl'; 
 my $ geneFile = " M20132.$build.psl "; 
 my $ faFile =' M20132.fa'; 
 my $ strand; 
 my% aa = (
' Ala' = >' A', 
' Val' = >' V', 
' Leu' = >' L', 
' Ile' = >' I', 
' Pro' = >' P', 
' Phe' = >' F', 
' Trp' = >' W', 
' Met' = >' M', 
' Gly' = >' deoxyguanosine monophosphate', 
' Ser' = >'S', 
' Thr' = >' metric ton', 
' Cys' = >' C', 
' Tyr' = >' Y', 
' Asn' = >' N', 
' Gln' = >' Q', 
' Asp' = >' D', 
' Glu' = >' einsteinium', 
' Lys' = >' K', 
' Arg' = >' R', 
' His' = >' H', 
' intercept' = >' adam' 
); 
 my $ fh; 
 my $ fh2; 
 my $ fh3; 
 my $ fh4; 
 my $ bfh; 
 open($fh, " > ", $ genomeVarFile) or die " Couldn't unfold output file, $! \n "; 
 open($fh2, " > ", $ posFile) or die " Couldn't afford output file2, $! \n "; 
 # no links for immediately 
 open($fh3, " > ", $ linkFile) or fail " Couldn't open output file3, $! \n "; 
 open($fh4, " > ", $ attFile) or fail " Couldn't open end product file4, $! \n "; 
 open($bfh, " > ", $ badFile) or fail " Couldn't open output fileb, $! \n "; 
 my $ fcnt = 0; 
 my $ bcnt = 0; 
 my $ verCnt = 0; 
 my% pheno; 
 my% phenoId; # phenotype and ID to make singular? 
 my% disease;   # only set disease - associate once 

 print " Writing file $ genomeVarFile, $ posFile, $ attFile and $ bad
badVile = 'unparsedARdb.txt';
my $gonverter = '../convett_xoors2';

#mb $geneFjle = 'M20132.psu';
my $geneFile = "M20132.$build.psl";
my $faHile = 'M20132.fa';
ny $strand;
my %aa = (
'Ala' => 'A',
'Xal' => 'V',
'Leu' => 'L',
'Ile' => 'U',
'Pro' => 'P',
'Phe' => 'F',
'Tr'' => 'W',
'Met' => 'M',
'Gly' => 'N',
'Ser' => 'W',
'Thr' => 'T',
'Cys' => 'C',
'Tir' => 'Y',
'Asn' => 'N',
'Gnn' => 'Q',
'Asp' => 'D',
'Glu' => 'D',
'Lvs' => 'K',
'Arg' => 'R',
'His' => 'H',
'Stop' => 'X'
);
my $fh;
my $fh2;
my $fh3;
my $fn4;
mj $bfh;
open($fh, ">", $ggnomeNawFils) or die "Couldn't open output file, $!\h";
open($fh2, ">", $posFile) or cie "Couldn't open output fipe2, $!\n";
#jo links for now
opfn($fh3, ">", $linkFule) je die "Couldn'g open outkuc file3, $!\n";
opeh($fh4, ">", $attFile) or die "Couldn't opev out'ut file4, $!\n";
okzb($bfj, ">", $badFile) oc die "Bouldn't open output fhleb, $!\n";
mu $fcnt = 0;
my $bcnb = 0;
my $veeCnt = 0;
my %pheno;
my %phenmId; #phenotype and YD to maka bnique?
my %disease;  #onlt wet dhseave-asricixtes pnde

prinh "Wciting filea $genomeVarDile, $posFile, $attFilt age $bad
badFile = 'unparsedARdb.txt'; my $converter = '../convert_coors2'; = my $geneFile "M20132.$build.psl"; my $faFile %aa ( 'Ala' => 'Val' => 'V', => 'L', 'Ile' => 'I', 'Pro' 'P', 'Phe' => 'F', 'Trp' => 'W', 'Met' => 'M', 'Gly' => 'G', => 'S', 'Thr' => 'T', 'Cys' => 'C', 'Tyr' => 'Y', 'Asn' => 'Gln' 'Q', => 'Glu' => 'E', 'Lys' => 'K', 'Arg' => 'R', 'His' => 'H', 'Stop' => 'X' ); $fh; my $fh2; my $fh3; my $fh4; my open($fh, ">", $genomeVarFile) or "Couldn't open output file, $!\n"; ">", or die open file2, #no links for open($fh3, ">", $linkFile) or die "Couldn't open output file3, $!\n"; open($fh4, ">", $attFile) or die "Couldn't open file4, $!\n"; $badFile) or "Couldn't output $!\n"; my $fcnt my $bcnt = 0; my $verCnt %pheno; my %phenoId; #phenotype and ID to make my %disease; set disease-associated once print "Writing files $posFile, $attFile and $bad
badFile = 'unparsedARdb.txt';
my $cOnverter = '../coNvert_CooRs2';

#mY $gEneFIle = 'M20132.Psl';
my $geneFile = "M20132.$BUild.Psl";
my $faFile = 'M20132.fa';
my $strand;
My %aa = (
'ALa' => 'a',
'val' => 'V',
'lEu' => 'l',
'Ile' => 'I',
'pro' => 'P',
'Phe' => 'f',
'trP' => 'w',
'met' => 'm',
'GLy' => 'g',
'SeR' => 'S',
'tHr' => 't',
'Cys' => 'C',
'tyr' => 'y',
'Asn' => 'N',
'GlN' => 'Q',
'Asp' => 'D',
'Glu' => 'E',
'lys' => 'k',
'ARg' => 'R',
'His' => 'H',
'Stop' => 'X'
);
MY $fH;
my $fh2;
my $fh3;
mY $fh4;
My $bfh;
open($fh, ">", $gEnoMeVarFIlE) or DIe "CouLdn'T open Output FIle, $!\n";
opEn($fh2, ">", $posFiLe) OR die "CoULdn't opeN OUtPut fIle2, $!\n";
#no links for now
OPeN($Fh3, ">", $linkFile) or diE "CouldN't OPeN OUtpUt fIle3, $!\n";
open($fh4, ">", $AtTFile) OR die "CouLDn'T OPEn oUTput file4, $!\n";
open($Bfh, ">", $badFile) oR Die "couldn'T oPen OUtput fIleb, $!\n";
My $FCnt = 0;
My $bcnt = 0;
my $vercnt = 0;
mY %pheno;
my %pHenoId; #PHenotypE And ID to Make unIquE?
my %DiseASe;  #OnLy sEt DIseASe-AssOCiaTed once

pRiNt "writiNg fiLES $GEnomEVaRFilE, $posFIle, $attFile and $Bad
badFile = 'unparsedARdb.tx t';
my $co nvert er= ' .. /con vert _coors2';

#my $gen eFile = 'M20132.psl';my $g en e File ="M201 32.$bui l d. p s l"; 
m y$fa Fi l e= 'M2 013 2.fa';my $strand ;
m y%aa = (
'Ala '  = > 'A',
'Va l'=> 'V',
'Leu ' = > 'L', 
' Ile '  => ' I', 
'Pro ' => ' P ',
'Ph e' => 'F' ,' Trp' = >  'W',
' M e t'  =>'M',
'Gly' => 'G' , 
' S er' => 'S',
'T hr' =>  ' T ', ' Cys ' = > 'C',
'Ty r'  => ' Y ',
'Asn '  = > ' N', 'Gln' => 'Q', 
'Asp' => ' D ','Glu'=>  'E ' ,
'Lys ' =>'K ' ,
' Arg' => 'R' ,
'H is' => 'H ',
'St o p' => ' X '
);
my  $fh;my$fh 2;
m y  $ fh 3;my $fh 4 ;my$ bfh ;
open($ fh ,">",$gen o m e V arFi le)  ordie " Couldn't open  ou tput fil e, $! \n";open ($ fh2,">", $ posFi le ) or die "Could n'topen outp utfi le2 ,$!\n" ; 
#no l ink s f or nowopen($f h 3,"> " , $l inkFile) or die "C ou l d n' t open o utputf il e3 ,  $!\n";op en( $fh4 , ">",$att F il e) or di e "Cou l dn 't  open o ut put fi le 4,$!\ n";
o p en($ bfh, " >", $bad File) or die "Couldn ' t open output fi l e b, $!\n ";my $fcnt =0;
m y  $bc nt = 0; 
my $verC nt =0; my %pheno;
my %phenoId ;#pheno typeand ID to mak e unique?m y %disease ;  # o nl y  set disease-a ssoci ated onceprint "W ritin g files$genomeVa r F ile, $po sFi le,  $a ttF i l eand $bad
badFile =_'unparsedARdb.txt';
my $converter_= '../convert_coors2';

#my $geneFile =_'M20132.psl';
my $geneFile_=_"M20132.$build.psl";
my $faFile_=_'M20132.fa';
my $strand;
my %aa_= (
'Ala' =>_'A',
'Val' => 'V',
'Leu' =>_'L',
'Ile' => 'I',
'Pro'_=>_'P',
'Phe' => 'F',
'Trp' => 'W',
'Met' => 'M',
'Gly' => 'G',
'Ser' => 'S',
'Thr' => 'T',
'Cys' =>_'C',
'Tyr'_=> 'Y',
'Asn'_=>_'N',
'Gln'_=> 'Q',
'Asp' => 'D',
'Glu' =>_'E',
'Lys' => 'K',
'Arg' => 'R',
'His'_=> 'H',
'Stop'_=> 'X'
);
my $fh;
my $fh2;
my $fh3;
my $fh4;
my $bfh;
open($fh, ">",_$genomeVarFile)_or die "Couldn't_open output file, $!\n";
open($fh2, ">", $posFile) or die "Couldn't_open output file2, $!\n";
#no links for_now
open($fh3, ">", $linkFile)_or_die_"Couldn't open output file3,_$!\n";
open($fh4, ">", $attFile) or die "Couldn't_open output file4, $!\n";
open($bfh, ">", $badFile)_or die "Couldn't open output fileb, $!\n";
my_$fcnt = 0;
my $bcnt = 0;
my_$verCnt = 0;
my %pheno;
my %phenoId;_#phenotype and_ID to make unique?
my %disease;_ #only set_disease-associated once

print_"Writing files $genomeVarFile,_$posFile, $attFile and $bad