script/list2mapper.pl untested

filter: Statementstmt 0.0% 0 / 31 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod n/a totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2 # PODNAME: list2mapper.pl
3 # ABSTRACT: Build final id mapper from id list using the NCBI Taxonomy database
4  
5 use Modern::Perl '2011';
6 use autodie;
7  
8 use Getopt::Euclid qw(:vars);
9 use Smart::Comments;
10  
11 use Bio::MUST::Core;
12 use Bio::MUST::Core::Utils qw(change_suffix);
13 use aliased 'Bio::MUST::Core::IdList';
14 use aliased 'Bio::MUST::Core::Taxonomy';
15  
16  
17 # build taxonomy object
18 my $tax = Taxonomy->new_from_cache( tax_dir => $ARGV_taxdir );
19  
20 my $method = $ARGV_from_must ? 'load_lis' : 'load';
21  
22 for my $infile (@ARGV_infiles) {
23  
24 ### Processing: $infile
25 my $list = IdList->$method($infile);
26 my $mapper = $tax->tax_mapper(
27 $list, { append_acc => $ARGV_append_acc }
28 );
29 my $outfile = change_suffix($infile, '.final-idm');
30 $mapper->store($outfile);
31 }
32  
33 __END__