input file
Xm_ABL1 Geneious extracted region 1 168 . + . Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="3512970000000 -> 3514640000000"
Xm_ABL1 Geneious extracted region 169 334 . + . Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="3717850000000 -> 3719500000000"
my part of perl code
if ($array[1] =~ /extracted region/){
die "No CDS record for $key!\n" unless $metadata->{$key};
(my $label = $array[7]) =~ s/.*region from (.*)\|;.*/$1/;
$label =~ s/\|/_/g;
$group->{$label} ||= { #seed summary if not exists
pos1 => 1e10,
pos2 => 0,
metadata => $metadata->{$key},
sequences => [],
};
(my $pos1, my $arr, my $pos2) = ($array[7]=~/.*interval=\"(\d+) (<?->?) (\d+)\"$/gm);
# capture hi/lo values for group
$group->{$label}->{pos1} = $pos1 if $pos1 < $group->{$label}->{pos1};
$group->{$label}->{pos2} = $pos2 if $pos2 > $group->{$label}->{pos2};
# push this sequence onto the group's array
push(@{ $group->{$label}->{sequences} }, [ $pos1, $pos2, $arrow->{$arr} ]);
}
In the code $pos1=3512970000000,3717850000000 & $pos2=3514640000000,3719500000000. My code prints new line finding minimum and maximum value (if $pos1 is less than 10,000), but if the value is greater than 10,0000 it gives error in printing minimum value of pos1. Any one help me in debug in finding minimum value of $pos1 and maximum value of $pos2
Xm_ABL1 Geneious extracted region 1 168 . + . Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="3512970000000 -> 3514640000000"
Xm_ABL1 Geneious extracted region 169 334 . + . Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="3717850000000 -> 3719500000000"
my part of perl code
if ($array[1] =~ /extracted region/){
die "No CDS record for $key!\n" unless $metadata->{$key};
(my $label = $array[7]) =~ s/.*region from (.*)\|;.*/$1/;
$label =~ s/\|/_/g;
$group->{$label} ||= { #seed summary if not exists
pos1 => 1e10,
pos2 => 0,
metadata => $metadata->{$key},
sequences => [],
};
(my $pos1, my $arr, my $pos2) = ($array[7]=~/.*interval=\"(\d+) (<?->?) (\d+)\"$/gm);
# capture hi/lo values for group
$group->{$label}->{pos1} = $pos1 if $pos1 < $group->{$label}->{pos1};
$group->{$label}->{pos2} = $pos2 if $pos2 > $group->{$label}->{pos2};
# push this sequence onto the group's array
push(@{ $group->{$label}->{sequences} }, [ $pos1, $pos2, $arrow->{$arr} ]);
}
In the code $pos1=3512970000000,3717850000000 & $pos2=3514640000000,3719500000000. My code prints new line finding minimum and maximum value (if $pos1 is less than 10,000), but if the value is greater than 10,0000 it gives error in printing minimum value of pos1. Any one help me in debug in finding minimum value of $pos1 and maximum value of $pos2