Bio-MUST-Apps-FortyTwo

 view release on metacpan or  search on metacpan

bin/compress-db.pl  view on Meta::CPAN

#!/usr/bin/env perl
# PODNAME: compress-db.pl
# ABSTRACT: Post-process assembler for transcript enrichment using 42

use Modern::Perl '2011';
use autodie;

use Getopt::Euclid qw(:vars);
use Path::Class qw(file dir);

## 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 Config::Any;

use Bio::MUST::Core;
use Bio::MUST::Drivers;
use aliased 'Bio::MUST::Core::Ali';
use aliased 'Bio::MUST::Core::Seq';
use aliased 'Bio::MUST::Core::SeqId';
use aliased 'Bio::MUST::Drivers::Cap3';
use aliased 'Bio::MUST::Apps::Debrief42';


# read configuration file
my $config = Config::Any->load_files( {
    files           => [ file($ARGV_config) ],
    flatten_to_hash => 1,
    use_ext         => 1,
    }
);

# build Debrief42 object
my $debrief42 = Debrief42->new(
    config     => $config->{$ARGV_config},
    report_dir => $ARGV_indir,
);

### Reading Tax-Reports...
my $run_report = $debrief42->run_report;
my @orgs = $run_report->all_orgs;

# create output dir named after input dir and settings
my $dirname = dir($ARGV_indir)->stringify;      # ignore trailing '/' if any
my $outdir = dir($dirname . '-compress' . "-o$ARGV_cap3_o" . "-p$ARGV_cap3_p");

### Creating outdir: $outdir->stringify
$outdir->mkpath();

for my $org (@orgs) {

    ### Processing: $org
    my $org_report = $run_report->org_report_for($org);

    my $ali = Ali->new;

    OUTFILE:
    for my $new_seqs (sort $org_report->all_new_seqs_by_outfile) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 5.780 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )