Bio-MUST-Tools-Mcl
view release on metacpan or search on metacpan
bin/abbr-ids-fas.pl view on Meta::CPAN
my $prefix_mapper;
if ($ARGV_id_prefix_mapper) {
### Taking prefixes from: $ARGV_id_prefix_mapper
$prefix_mapper = IdMapper->load($ARGV_id_prefix_mapper);
}
for my $infile (@ARGV_infiles) {
### Processing: $infile
my $ali = Ali->load($infile);
$ali->dont_guess;
# determine seq_id prefix
my $prefix = $ARGV_id_prefix // q{}; # defaults to no prefix
if ($prefix_mapper) { # infile paths are ignored
my ($filename) = fileparse($infile);
$prefix .= $prefix_mapper->abbr_id_for($filename);
}
if ($prefix) {
### Prefixing seq ids with: $prefix
$prefix .= '|'; # add '|' separator
bin/extract-mcl-out.pl view on Meta::CPAN
next LINE if $line =~ $EMPTY_LINE
|| $line =~ $COMMENT_LINE;
# extract id list for current group
my ($group, @ids) = split /\s+/xms, $line;
$group =~ s/:\z//xms; # remove trailing colon (:)
my $list = IdList->new( ids => \@ids );
# assemble Ali and store it as FASTA file
my $ali = $list->reordered_ali($db);
$ali->dont_guess;
my $outfile = file($dir, change_suffix($group, '.fasta') )->stringify;
$ali->store_fasta($outfile);
}
}
__END__
=pod
=head1 NAME
( run in 0.579 second using v1.01-cache-2.11-cpan-748bfb374f4 )