以下のようなファイルがほとんどなく、画像に示されているように数値プロファイリングを実行しようとしています
>File Sample
attttttttttttttacgatgccgggggatgcggggaaatttccctctctctctcttcttctcgcgcgcg
aaaaaaaaaaaaaaagcgcggcggcgcggasasasasasasaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
サイズ2の各サブストリングをマップしてから、さまざまなptopertiesの33の値にマップしてから、ウィンドウサイズ5に従って追加する必要があります。
my %temp = (
aCount => {
aa =>2
}
cCount => {
aa => 0
}
);
私の現在の実装には、以下のようなものが含まれます、
while (<FILE>) {
my $line = $_;
chomp $line;
while ($line=~/(.{2})/og) {
$subStr = $1;
if (exists $temp{aCount}{$subStr}) {
push @{$temp{aCount_array}},$temp{aCount}{$subStr};
if (scalar(@{$temp{aCount_array}}) == $WINDOW_SIZE) {
my $sum = eval (join('+',@{$temp{aCount_array}}));
shift @{$temp{aCount_array}};
#Similar approach has been taken to other 33 rules
}
}
if (exists $temp{cCount}{$subStr}) {
#similar approach
}
$line =~s/.{1}//og;
}
}
プロセス全体の速度を上げるための他のアプローチはありますか