File: iteratively_realign_db_selfsearch.pl

package info (click to toggle)
microbiomeutil 20101212%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 49,304 kB
  • sloc: perl: 4,878; ansic: 420; makefile: 98; sh: 27
file content (41 lines) | stat: -rwxr-xr-x 628 bytes parent folder | download | duplicates (6)
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
#!/usr/bin/env perl

use strict;
use warnings;

use FindBin;
use lib ("$FindBin::Bin/../PerlLib");


my $usage = "usage: $0 db.NAST db.FASTA\n\n";

my $db = $ARGV[0] or die $usage;
my $blastable = $ARGV[1] or die $usage;

my $prev = $db;
for my $i (1..25) {
	
	print STDERR "// processing round $i\n";
	
	my $cmd = "$FindBin::Bin/../run_NAST-iEr.pl --query_FASTA $prev --db_NAST $prev --db_FASTA $blastable > $i.NAST 2>/dev/null";

	&process_cmd($cmd);


	$prev = "$i.NAST";
}

exit(0);

####
sub process_cmd {
	my $cmd = shift;

	my $ret = system($cmd);
	if ($ret) {
		die "Error, cmd $cmd died with ret $ret";
	}

	return;
}