Bio-MUST-Apps-HmmCleaner

 view release on metacpan or  search on metacpan

bin/frameshiftSimul_final.pl  view on Meta::CPAN

#!/usr/bin/env perl
# PODNAME: frameshiftSimul_final.pl
# ABSTRACT: Simulation for HmmCleaner
# CONTRIBUTOR: Denis BAURAIN <denis.baurain@uliege.be>

use Modern::Perl;
use autodie;

use Carp;
use Path::Class;
use File::Basename;
#~ use File::Temp qw(tempfile); my $template = 'tmpfile_XXXX';
use List::AllUtils qw(shuffle sum0 any firstidx);
use IPC::System::Simple qw(system);
use Getopt::Euclid qw(:vars);
use Template;


use Bio::MUST::Core;
use Bio::MUST::Core::Constants qw(:gaps);
use Bio::MUST::Core::Utils qw(change_suffix);
use aliased 'Bio::MUST::Core::Ali';
use aliased 'Bio::MUST::Core::Seq';
use aliased 'Bio::MUST::Core::IdList';
use aliased 'Bio::MUST::Core::SeqMask';
use aliased 'Bio::MUST::Core::GeneticCode::Factory';

## no critic (RequireLocalizedPunctuationVars)
BEGIN{
    $ENV{Smart_Comments} = $ARGV_verbosity
        ? join q{ }, map { '#' x (2 + $_) } 1..$ARGV_verbosity
        : q{}
    ;
}
## use critic
use Smart::Comments -ENV;

use Bio::MUST::Apps::HmmCleaner;
use aliased 'Bio::MUST::Apps::HmmCleaner';

### %ARGV

my $sf = $ARGV_sf // undef;
my $nf = $ARGV_nf // undef;

my $base_global_name = join '_',('stat', 'global', 'nf'.((defined $nf) ? $nf : 'rand'), 'sf'.((defined $sf) ? $sf : 'rand'), 'sub'.((defined $ARGV_subset) ? $ARGV_subset : 'all'), 'r'.$ARGV_rep);

my $outfile_global = $base_global_name.'.out';
my $outfile_frameshift_global = (join '_',($base_global_name, 'frameshift')).'.out';
my $outfile_fp_global = (join '_',($base_global_name, 'fp')).'.out';
my $simul_file_global = file($outfile_global);
my $simul_file_frameshift_global = file($outfile_frameshift_global);
my $simul_file_fp_global = file($outfile_fp_global);
my $out_global = $simul_file_global->openw;
my $out_frameshift_global = $simul_file_frameshift_global->openw;
my $out_fp_global = $simul_file_fp_global->openw;

#~ say {$out_global} '#'.join "\t",(
    #~ qw(File #Replicate #Frameshift Frameshift_size Threshold #Seq Ali_width #AA TruePositive TrueNegative FalsePositive FalseNegative MeanWithAllFrameshift)
#~ );
#~ say {$out_frameshift_global} '#'.join "\t",(
    #~
#~ );
#~ say {$out_fp_global} '#'.join "\t",(
    #~
#~ );



( run in 0.683 second using v1.01-cache-2.11-cpan-437f7b0c052 )