#!/usr/bin/perl
my ($h, $n, $l);
open(I,$ARGV[0]) or die($!);
while(<I>){
chomp;
if(/^>/){
$h=substr($_,1);
}else{
$n=($_=~tr/nN/nN/);
$l=length($_);
print $h,"\t",$l,"\t",$n,"\t",$n/($l-$n),"\n";
}
}
close(I);