script/idealize-ali.pl untested

filter: Statementstmt 0.0% 0 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod n/a totaltotal 0.0% 0 / 42 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: idealize-ali.pl
3 # ABSTRACT: Discard (nearly) gap-only sites from ALI files
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(secure_outfile);
13 use aliased 'Bio::MUST::Core::Ali';
14 use aliased 'Bio::MUST::Core::SeqMask';
15  
16  
17 for my $infile (@ARGV_infiles) {
18  
19 ### Processing: $infile
20 my $ali = Ali->load($infile);
21  
22 my $mask = SeqMask->ideal_mask($ali, $ARGV_max_res_drop_site);
23 $mask = $mask->codon_mask( {
24 frame => $ARGV_coding_frame,
25 max => $ARGV_codon_max_nt_drop,
26 } ) if $ARGV_keep_codons;
27 $ali->apply_mask($mask);
28  
29 my $outfile = secure_outfile($infile, $ARGV_out_suffix);
30 $ali->store($outfile);
31 }
32  
33 __END__