[Bio] / FigKernelScripts / FFB3_run_parallel_usable_motifs.pl Repository:
ViewVC logotype

View of /FigKernelScripts/FFB3_run_parallel_usable_motifs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Tue Jan 10 13:18:14 2012 UTC (7 years, 10 months ago) by olson
Branch: MAIN
CVS Tags: rast_rel_2014_0729, mgrast_version_3_2, rast_rel_2014_0912, HEAD
New figfam building code.

#
# run usable_motifs on a set of per-base kmer possibilites
#

use strict;
use Proc::ParallelLoop;

@ARGV == 5 or die "Usage: $0 nprocs input-dir output-dir range columns\n";

my $nprocs = shift;
my $input_dir = shift;
my $output_dir = shift;
my $range = shift;
my $columns = shift;

my @columns = split(/,/, $columns);

my @input = <$input_dir/all.*>;
my %input;

for my $f (@input)
{
    if ($f =~ /all.([A-Z])$/)
    {
	$input{$1} = $f;
    }
}

my @c = sort { $a cmp $b } keys %input;

pareach \@c, sub {
    my($c) = shift;
    my $file = $input{$c};
    print "$$ $c $file\n";
    for my $col (@columns)
    {
	my $cmd = "FFB3_usable_motifs $output_dir/kmers.$col.$c $range $col $file";
	my $rc = system($cmd);
	if ($rc != 0)
	{
	    print "error $rc: $cmd\n";
	}
    }
}, { Max_Workers => $nprocs }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3