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

Diff of /FigKernelScripts/ma_pipeline.pl

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

revision 1.3, Thu May 6 02:25:33 2010 UTC revision 1.11, Sat Jun 5 15:38:44 2010 UTC
# Line 24  Line 24 
24  (-s "$orgD/Features/peg/tbl")  (-s "$orgD/Features/peg/tbl")
25      || die "Where is $orgD/Features/peg/tbl?";      || die "Where is $orgD/Features/peg/tbl?";
26    
27  &run("make_probes_to_genes $exp_ed/probes $orgD/contigs $orgD/Features/peg/tbl $exp_ed/peg.probe.table $exp_ed/probe.occ.table 2> $exp_ed/problems");  my $tbl = (-s "$exp_ed/tbl") ? "$exp_ed/tbl" : "$orgD/Features/peg/tbl";
28    &run("make_probes_to_genes $exp_ed/probes $orgD/contigs $tbl $exp_ed/peg.probe.table $exp_ed/probe.occ.table 2> $exp_ed/problems");
29  system "pushd $exp_ed";  &run("remove_multiple_occurring_probes $exp_ed/peg.probe.table $exp_ed/probe.occ.table > $exp_ed/peg.probe.table.no.multiple");
30  chdir $exp_ed;  chdir $exp_ed;
31    
32  &run("Rscript $FIG_Config::bin/RunRMA.R $rma_key $exp_ed/peg.probe.table $exp_ed/Experiments 2> $exp_ed/stderr.RMA");  &make_missing_probes("$exp_ed/peg.probe.table.no.multiple", "$exp_ed/probes", "$exp_ed/probe.no.match");
33    
34    &run("Rscript $FIG_Config::bin/RunRMA.R $rma_key $exp_ed $exp_ed/Experiments 2> $exp_ed/stderr.RMA");
35  &run("$FIG_Config::bin/call_coregulated_clusters_on_chromosome $genome $exp_ed/raw_data.tab > $exp_ed/coregulated.clusters 2> $exp_ed/stderr.coregulated.clusters");  &run("$FIG_Config::bin/call_coregulated_clusters_on_chromosome $genome $exp_ed/raw_data.tab > $exp_ed/coregulated.clusters 2> $exp_ed/stderr.coregulated.clusters");
36  &run("$FIG_Config::bin/make_coreg_conjectures_based_on_subsys  $genome $exp_ed/raw_data.tab > $exp_ed/coregulated.subsys   2> $exp_ed/stderr.coregulated.subsys");  &run("$FIG_Config::bin/make_coreg_conjectures_based_on_subsys  $genome $exp_ed/raw_data.tab > $exp_ed/coregulated.subsys   2> $exp_ed/stderr.coregulated.subsys");
37  &run("cat $exp_ed/coregulated.clusters $exp_ed/coregulated.subsys | cut -f1 | $FIG_Config::bin/merge_gene_sets > $exp_ed/merged.clusters");  &run("cat $exp_ed/coregulated.clusters $exp_ed/coregulated.subsys | cut -f1 | $FIG_Config::bin/merge_gene_sets | filter_on_known $exp_ed/raw_data.tab > $exp_ed/merged.clusters");
38  &run("Rscript $FIG_Config::bin/Pipeline.R $exp_ed/merged.clusters 0.7 > $exp_ed/comments.by.Pipeline.R");  
39    &run("get_ON_probes $genome $exp_ed/probe.occ.table $exp_ed/peg.probe.table $exp_ed/raw_data.tab > $exp_ed/probes.always.on");
40    &run("cut -f2 $exp_ed/probes.always.on | sort -u > $exp_ed/pegs.always.on");
41    &run("Rscript $FIG_Config::bin/Pipeline.R $exp_ed/pegs.always.on $exp_ed/merged.clusters > $exp_ed/comments.by.Pipeline.R");
42  &run("Rscript $FIG_Config::bin/SplitGeneSets.R $exp_ed/merged.clusters 0.7 > $exp_ed/split.clusters");  &run("Rscript $FIG_Config::bin/SplitGeneSets.R $exp_ed/merged.clusters 0.7 > $exp_ed/split.clusters");
43  system "popd";  &run("$FIG_Config::bin/compute_atomic_regulons $genome");
44    
45    sub make_missing_probes
46    {
47        my($probe_table, $probes, $output) = @_;
48        open(MATCH,"<", $probe_table) or die "Cannot open $probe_table: $!";
49        open(PROBES,"<", $probes) or die "Cannot open $probes: $!";
50        open(OUTPUT, ">", $output) or die "Cannot open $output: $!";
51        my %locations;
52        while(<MATCH>)
53        {
54            chomp;
55            my($peg,$loc)=split "\t";
56            $locations{$loc} = $peg;
57        }
58    
59        while(<PROBES>)
60        {
61            chomp;
62            my($loc,$seq) = split "\t";
63            print OUTPUT $loc, "\n" if ! exists $locations{$loc};
64        }
65        close(MATCH);
66        close(PROBES);
67        close(OUTPUT);
68    }
69    
70  sub run {  sub run {
71      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3