Bio-Tradis
view release on metacpan or search on metacpan
lib/Bio/Tradis/CombinePlots.pm view on Meta::CPAN
sub _write_stats {
my ( $self, $id, $seq_len ) = @_;
my $combined_dir = $self->combined_dir;
my $comb_plot = "$combined_dir/$id.insert_site_plot";
#my $seq_len = `wc $comb_plot | awk '{print \$1}'`;
#chomp($seq_len);
my $uis = `grep -c -v "0 0" $comb_plot`;
chomp($uis);
my $sl_per_uis = "NaN";
$sl_per_uis = $seq_len / $uis if($uis > 0);
my $stats = "$id,$seq_len,$uis,$sl_per_uis\n";
print { $self->_stats_handle } $stats;
return 1;
}
sub _abs_path_list {
my ( $self, $files ) = @_;
lib/Bio/Tradis/RunTradis.pm view on Meta::CPAN
my $plotname = $self->_plotname($si);
system(
"gunzip -c $temporary_directory/$plotname > $temporary_directory/tmp.plot"
);
my $uis = `grep -c -v "0 0" $temporary_directory/tmp.plot`;
chomp($uis);
$total_uis += $uis;
$stats .= "$uis,";
my $seqlen = ${$seq_info}{$si};
$total_seq_len += $seqlen;
my $uis_per_seqlen = "NaN";
$uis_per_seqlen = $seqlen / $uis if ( $uis > 0 );
chomp($uis_per_seqlen);
$stats .= "$uis_per_seqlen,";
}
$stats .= "$total_uis,";
my $t_uis_p_l = "NaN";
$t_uis_p_l = $total_seq_len / $total_uis if ( $total_uis > 0 );
$stats .= "$t_uis_p_l\n";
print { $self->_stats_handle } $stats;
}
sub _write_stats_header {
my ($self) = @_;
my @seqnames = keys %{ $self->_sequence_info };
my @fields = (
"File",
( run in 0.380 second using v1.01-cache-2.11-cpan-4d50c553e7e )