Last active
August 29, 2015 14:13
-
-
Save sestaton/7143b526c76b8e1f84b3 to your computer and use it in GitHub Desktop.
biostars125994.pl - align all files in a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Find; | |
use Bio::Tools::Run::Alignment::Clustalw; | |
my $dir = 'genes'; | |
my @files; | |
find( sub { | |
push @files, $File::Find::name if -f and /\.fa$/ | |
}, $dir); | |
for my $file (@files) { | |
my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM', 'outfile' => "$file.aln"); | |
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params); | |
my $aln = $factory->align($file); | |
# do something with $aln | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment