Skip to content
Snippets Groups Projects
Commit 55af15f8 authored by Graham McVicker's avatar Graham McVicker
Browse files

avoid a couple of warnings

parent 800d0695
No related branches found
No related tags found
No related merge requests found
...@@ -123,7 +123,7 @@ sub store { ...@@ -123,7 +123,7 @@ sub store {
$sequence = uc($sequence); $sequence = uc($sequence);
my $bvector; my $bvector = '';
#convert sequence to 0s,1s,2s and 3s #convert sequence to 0s,1s,2s and 3s
$sequence =~ tr/ACTG/0123/; $sequence =~ tr/ACTG/0123/;
...@@ -136,10 +136,11 @@ sub store { ...@@ -136,10 +136,11 @@ sub store {
my $len = length($sequence); my $len = length($sequence);
for(my $i=0; $i < $len; $i++) { for(my $i=0; $i < $len; $i++) {
#pack the
my $char = substr($sequence,$i,1); my $char = substr($sequence,$i,1);
if(($char+0) eq $char) { #fast way to check if an int #quickly check if this character was an A,C,T or G (and was converted to
# a 0,1,2,3)
if($char =~ /[0-3]/) {
vec($bvector, $i,2) = $char; vec($bvector, $i,2) = $char;
if($nline_char) { if($nline_char) {
#end of an nline #end of an nline
...@@ -167,6 +168,7 @@ sub store { ...@@ -167,6 +168,7 @@ sub store {
$nline_len = 1; $nline_len = 1;
$nline_off = $i+1; $nline_off = $i+1;
} }
$char = 0; #need to put numeric val into bitvector despite nline
} }
vec($bvector, $i,2) = $char; vec($bvector, $i,2) = $char;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment