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

View of /FigKernelScripts/FFB3_package_figfams.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.

########################################################################

use strict;
use FIG;
use File::Basename;

my $usage = "usage: FFB3_package_figfams ReleaseDir dest";

@ARGV == 2 or die "$usage\n";

my $ffdir = shift;
my $dest = shift;

my $dir = dirname($ffdir);
my $base = basename($ffdir);

-f "$ffdir/families.2c" or die "Invalid FF dir $ffdir\n";

my @to_copy = qw(FRI.db
		 assigned_functions.btree assigned_functions.txt
		 extra_prok_seqs.fasta 
		 fam.func.index
		 families.2c
		 family.functions
		 family.vector.def
		 family2function.db
		 family2pegs.db
		 function.index
		 function2families.db
		 function2index.db
		 genome2families.db
		 length.btree
		 peg2family.db
		 role2families.db
		 setI
		 setI.db
		 translation.btree
		 );

@to_copy = map { "$base/$_" } @to_copy;

# for my $k (8)
# {
#     my $tarfile = "$dest/$base.kmers.$k.tgz";
#     my $rc = system("tar", "-C", $dir,
# 		    "-c",
# 		    "-z",
# 		    "-v",
# 		    "-f", $tarfile,
# 		    "$base/Merged/$k");
    
#     if ($rc != 0)
#     {
# 	die "Error rc=$rc writing tarfile\n";
#     }
# }

my $rc = system("tar", "-C", $dir,
		"-c",
		"-z",
		"-v",
		"-f", "$dest/$base.figfams.tgz",
		@to_copy);

if ($rc != 0)
{
    die "Error rc=$rc writing tarfile\n";
}
		

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3