if ($B1=~ m/^*/ | $B2=~ m/^*/) { my $type; $type eq "S"; } else { $type eq "I"; } #### my $SNP_FILE="SNP.test.out"; # Will be $out in future, just hardcoded to SNP.report for testing now. open (LINES,"<$SNP_FILE") || die ("Could not open file! \n"); # Read SNP File ; while ($SNP_FILE=) { my ($contig, $PP, $UPP, $Cons, $Cov, $Conflicts, $B1, $B2)=split('\t', $SNP_FILE); #Split line of SNP File my $ratio=sprintf("%.2f",($Conflicts/$Cov)); #Creates new variable of ratio of Conflict Count/Total Coverage $PP=$PP+1; # Bump padded position coordinate by 1, as gap4 coordinates are off by 1 base compared to bank file $Cons=~ s/-/*/; # Replace - with gap4 pad notation in consensus variable $B1=~ s/-/*/; # Replace - with gap4 pad notation in Base 1 variable $B2=~ s/-/*/; # Replace - with gap4 pad notation in Base 2 variable chomp $B2; $contig=~ s/Contig/#/; # Replace contig with number sign so gap4 can recognize contig identifier if ($B1=~ m/^"*"/ or $B2=~ m/^"*"/) { my $type eq "S"; } else { my $type eq "I"; } my $type; print "$contig $PP $Cons $Cov $Conflicts $B1 $B2 $ratio $type \n"; } close (LINES);