/usr/lib/WigeoN/util/all_vs_all_WigeoN.pl is in wigeon 20101212+dfsg1-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use Fasta_reader;
my $usage = "usage: $0 multiFasta.NAST\n\n";
my $fasta_file = $ARGV[0] or die $usage;
main: {
my %seqs = &parse_seqs($fasta_file);
my @accs = sort keys %seqs;
for (my $i = 0; $i < $#accs; $i++) {
my $acc_i = $accs[$i];
my $seq_i = $seqs{$acc_i};
open (my $fh, ">tmp.query.$$") or die $!;
print $fh ">$acc_i\n$seq_i\n";
close $fh;
for (my $j = $i + 1; $j <= $#accs; $j++) {
my $acc_j = $accs[$j];
my $seq_j = $seqs{$acc_j};
open ($fh, ">tmp.ref.$$") or die $!;
print $fh ">$acc_j\n$seq_j\n";
close $fh;
## Run WigeoN
my $cmd = "$FindBin::Bin/../WigeoN.pl -Q tmp.query.$$ -R tmp.ref.$$ -P $FindBin::Bin/../data/rRNA16S.gold.NAST_ALIGNED.fasta.cons -M $FindBin::Bin/../data/eco.prokMSA";
my $ret = system($cmd);
if ($ret) {
print "## error w/ Q: $acc_i and R: $acc_j\n";
}
}
}
exit(0);
}
####
sub parse_seqs {
my ($file) = @_;
my %seqs;
my $fasta_reader = new Fasta_reader($file);
while (my $seq_obj = $fasta_reader->next() ) {
my $acc = $seq_obj->get_accession();
my $sequence = $seq_obj->get_sequence();
$seqs{$acc} = $sequence;
}
return(%seqs);
}
|