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

Diff of /FigKernelScripts/FFB2_build_updated_FF.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Mon Nov 16 21:56:22 2009 UTC revision 1.7, Wed Jun 23 21:16:51 2010 UTC
# Line 12  Line 12 
12  )  )
13      || die $usage;      || die $usage;
14    
15    my $sort_args = "-T $FIG_Config::temp -S 4G";
16    
17  mkdir($newD,0777) || die "You have an existing $newD; remove it and try again";  mkdir($newD,0777) || die "You have an existing $newD; remove it and try again";
18  &FIG::run("FFB2_update_FIGfams $newD/families.2c $newD/family.functions $oldD");  
19  &FIG::run("FFB2_get_oligos $newD/families.2c $newD/family.functions 2> $newD/function.index |" .  my $parallel = 0;
20            "sort -T . | FFB2_usable_motifs $newD/Kmers");  my $child_pid;
21    if ($parallel)
22    {
23        #
24        # Run the FF update in a child process while we manage getting the phylo oligos here.
25        #
26    
27        $child_pid = fork;
28    
29        if ($child_pid == 0)
30        {
31            figfam_processing();
32            exit;
33        }
34    }
35    else
36    {
37        figfam_processing();
38    }
39    
40  &FIG::run("FFB2_get_prots $newD/ProtsByGenomeSet $newD/setI");  &FIG::run("FFB2_get_prots $newD/ProtsByGenomeSet $newD/setI");
41  &FIG::run("FFB2_get_prot_gs_oligos $newD/ProtsByGenomeSet 12 | sort -T . | FFB2_usable_motifs $newD/PhyloSigs");  &FIG::run("FFB2_get_prot_gs_oligos $newD/ProtsByGenomeSet 12 | sort $sort_args | FFB2_usable_motifs $newD/PhyloSigs");
42    
43    if ($parallel)
44    {
45        my $rc = waitpid($child_pid, 0);
46        if ($? != 0)
47        {
48            die "Error running parallel child: $?\n";
49        }
50    }
51    
52    
53  mkdir("$newD/Merged",0777) || die "could not make $newD/Merged: $!";  mkdir("$newD/Merged",0777) || die "could not make $newD/Merged: $!";
54  foreach my $i (7..12)  foreach my $i (7..12)
55  {  {
# Line 32  Line 63 
63  {  {
64      &FIG::run("FFB2_create_binary_kmers -s 4,2 $newD/Merged/$i/merged.oligos $newD/Merged/$i/table.binary");      &FIG::run("FFB2_create_binary_kmers -s 4,2 $newD/Merged/$i/merged.oligos $newD/Merged/$i/table.binary");
65  }  }
66    
67    system("FFB2_run_tests $newD");
68    system("FFB2_compare_tests $oldD $newD");
69    &FIG::run("build_prok_nonff_fasta $newD > $newD/extra_prok_seqs.fasta");
70    &FIG::run("formatdb -p T -i $newD/extra_prok_seqs.fasta");
71    
72    &FIG::run("FFB2_make_FF_index $newD $newD/fam.func.index $newD/FamFuncBlastD");
73    &FIG::run("FFB2_build_ff_indexes $newD");
74    
75    sub figfam_processing
76    {
77        &FIG::run("FFB2_update_FIGfams $newD/families.2c $newD/family.functions $oldD");
78        &FIG::run("FFB2_get_oligos $newD/families.2c $newD/family.functions 2> $newD/function.index |" .
79                  "sort $sort_args | FFB2_usable_motifs $newD/Kmers");
80    }
81    
82    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3