我想了解一段循环遍历一个文件的代码,做了各种赋值,然后输入一组if语句,其中一个字符串似乎没有任何东西。 /nonsynonymous/
和/prematureStop/
与这里相比是什么?我大部分都是经验丰富的Python。这个if语句做了什么? (字符串比较)
open(IN,$file);
while(<IN>){
chomp $_;
my @tmp = split /\t+/,$_;
my $id = join("\t",$tmp[0],$tmp[1]-1);
$id =~ s/chr//;
my @info_field = split /;/,$tmp[2];
my $vat = $info_field[$#info_field];
my $score = 0;
$self -> {VAT} ->{$id}= $vat;
$self ->{GENE} -> {$id} = $tmp[3];
if (/nonsynonymous/ || /prematureStop/){...