$in1=$ARGV[0]; $in2=$ARGV[1]; $in3=$ARGV[2]; $out1=$ARGV[3]; if (scalar @ARGV != 4){ die " Wrong command\n\n"; } open(OUT,">$outfile"); open (IN1,"$in1"); while (){ if ($_ !~ /^\expr/ && $_ !~ /^expr/){ if ($_ =~ /expr/){ if(cond){$some_count++;} } } } close IN1; undef (@_);undef ($_);undef ($in1); $per_reads_aligned = ($reads_aligned/$total_reads)*100; my %hash1 = (); open (IN2,"$in2"); while (){ chomp ($_); $hash1{$_} = 1; } $count2=keys(%hash1); close IN2; undef ($in2); undef (@_); undef ($_); open (IN3,"$in3"); while (){ if ($_ =~ /expr/){ $var1=$1;$var2=$2;$var3=$3;$var4=$4; if($var1 ne "N" && $var1 ne "S"){ $hhkey1=$var2."_".$var4; if (exists $hash1{$hhkey1}){ $count3++; if($var3 >= 5){$count5++;} if($var3 >= 10){$count6++;} if($var3 >= 15){$count7++;} if($var3 >= 20){$count8++;} } } } } close IN3; undef ($in3); undef (@_); undef ($_); undef (%hash1); ## Some calculation and print to outfile close OUT;