comparison bin/align.pm @ 40:4bc00caa60b4 draft

Uploaded
author pierre.pouchin
date Thu, 12 Jul 2018 08:27:08 -0400
parents 8d8357dee6b3
children 9645d995fb3c
comparison
equal deleted inserted replaced
39:40fba438db33 40:4bc00caa60b4
355 open(my $out, ">".$out_file) || die "cannot open normalized file $! \n"; 355 open(my $out, ">".$out_file) || die "cannot open normalized file $! \n";
356 print $out "ID\treads counts\tRPKM"; 356 print $out "ID\treads counts\tRPKM";
357 print $out "\tper million of piRNAs" if ($piRNA_number != 0); 357 print $out "\tper million of piRNAs" if ($piRNA_number != 0);
358 print $out "\tper million of miRNAs" if ($miRNA_number != 0); 358 print $out "\tper million of miRNAs" if ($miRNA_number != 0);
359 print $out "\tper million of bonafide reads" if ($bonafide_number != 0); 359 print $out "\tper million of bonafide reads" if ($bonafide_number != 0);
360 print $out "\tsens reads counts\treverse reads counts"; 360 print $out "\tsense reads counts\treverse reads counts";
361 print $out "\t% of sens 1U\t% of sens 10A\t% of reverse 1U\t% of reverse 10A\n"; 361 print $out "\t% of sense 1U\t% of sense 10A\t% of reverse 1U\t% of reverse 10A\n";
362 foreach my $k ( sort keys %{$counthashR} ) 362 foreach my $k ( sort keys %{$counthashR} )
363 { 363 {
364 my ($rpkm, $pirna, $mirna, $bonafide) = (0,0,0,0); 364 my ($rpkm, $pirna, $mirna, $bonafide) = (0,0,0,0);
365 365
366 $rpkm = ( $counthashR->{$k}->[0] * 1000000000) / ( $sizehashR->{$k} * $mapped) if ( $sizehashR->{$k} * $mapped) != 0 ; 366 $rpkm = ( $counthashR->{$k}->[0] * 1000000000) / ( $sizehashR->{$k} * $mapped) if ( $sizehashR->{$k} * $mapped) != 0 ;