Mercurial > repos > matces > carpet_toolsuite
annotate carpet-src-1/tools/CARPET/calcolo_p_v4_norm_intron.pl @ 1:78770028dcf1 default tip
Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author | matces |
---|---|
date | Tue, 07 Jun 2011 16:59:33 -0400 |
parents | cdd489d98766 |
children |
rev | line source |
---|---|
0
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
1 #! /usr/bin/perl |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
2 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
3 # Copyright 2009 Matteo Cesaroni, Lucilla Luzi |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
4 # |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
5 # This program is free software; ; you can redistribute it and/or modify |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
6 # it under the terms of the GNU Lesser General Public License as published by |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
7 # the Free Software Foundation; either version 3 of the License, or (at your |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
8 # option) any later version. |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
9 # |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
10 # This program is distributed in the hope that it will be useful, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
13 # GNU General Public License for more details. |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
14 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
15 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
16 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
17 #prende tutte le probes che mecciano almeno in parte dentro gli esoni |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
18 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
19 use Statistics::PointEstimation; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
20 use Statistics::TTest; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
21 #use Statistics::Test::WilcoxonRankSum; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
22 use Getopt::Long; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
23 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
24 GetOptions ( |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
25 "help" => \$OPT{help}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
26 "ann=s" => \$OPT{ann}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
27 "wt=s" => \$OPT{wt}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
28 "treat=s" => \$OPT{treat}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
29 "out=s" => \$OPT{out}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
30 "pv=s" => \$OPT{prob}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
31 "rc=s" => \$OPT{raw_cut}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
32 "fc=s" => \$OPT{fc_cut}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
33 "exon=s" => \$OPT{exon}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
34 "opt=s" => \$OPT{option}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
35 "norm=s" =>\$OPT{norm_q}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
36 "sum_met=s" =>\$OPT{sum_met}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
37 "fdr=s" =>\$OPT{fdr}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
38 "log=s" =>\$OPT{log_t}, |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
39 )|| printusage(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
40 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
41 # opzioni da linea di comando |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
42 my $file_ann=$OPT{ann}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
43 my $file_wt=$OPT{wt}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
44 my $file_treat=$OPT{treat}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
45 my $file_output=$OPT{out}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
46 my $pv_cut=$OPT{prob}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
47 my $media_cut=$OPT{raw_cut}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
48 my $FC_cut=$OPT{fc_cut}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
49 my $tipo=$OPT{exon}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
50 my $option=$OPT{option}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
51 my $normalization_q=$OPT{norm_q}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
52 my $sum_meth=$OPT{sum_met}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
53 my $corretction=$OPT{fdr}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
54 my $data_log=$OPT{log_t}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
55 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
56 $help and printusage(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
57 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
58 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
59 if($option eq "comp"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
60 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
61 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
62 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
63 \# wt_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
64 \# treat_file: $file_treat |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
65 \# p-value cutoff: $pv_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
66 \# raw data cutoff cutoff: $media_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
67 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
68 \# fold change cutoff: $FC_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
69 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
70 \# headers: name RefSeq Chr txStart txEnd strand mean_chip1 mean_chip2 FC_mean median_chip1 median_chip2 FC_median num_probes_in_gene p-value FDR(q-value) |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
71 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
72 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
73 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
74 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
75 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
76 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
77 \# wt_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
78 \# treat_file: $file_treat |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
79 \# p-value cutoff: $pv_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
80 \# raw data cutoff cutoff: $media_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
81 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
82 \# fold change cutoff: $FC_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
83 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
84 \# headers: name RefSeq Chr txStart txEnd strand mean_chip1 mean_chip2 FC_mean num_probes_in_gene p-value FDR(q-value) |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
85 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
86 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
87 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
88 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
89 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
90 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
91 \# wt_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
92 \# treat_file: $file_treat |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
93 \# p-value cutoff: $pv_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
94 \# raw data cutoff cutoff: $media_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
95 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
96 \# fold change cutoff: $FC_cut |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
97 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
98 \# headers: name RefSeq Chr txStart txEnd strand median_chip1 median_chip2 FC_median num_probes_in_gene p-value FDR(q-value) |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
99 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
100 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
101 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
102 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
103 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
104 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
105 # "usage" se non ci sono opzioni |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
106 if (!$file_ann || !$file_wt || !$file_treat) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
107 &printusage() |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
108 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
109 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
110 #if ($pv_cut == 1){$pv_cut=0.9999;} |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
111 if (!$media_cut){$media_cut=0;} |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
112 if (!$FC_cut){$FC_cut=0;} |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
113 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
114 my @r1=(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
115 my @r2=(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
116 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
117 #my $confident=(1-$pv_cut)*100; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
118 #inserire nell'ordine: tabella annotazione, tabella valori wt, tabella valori treated, p-value cutoff, raw signal cutoff |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
119 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
120 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
121 open (annotation,"<$file_ann") || die "file_ann not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
122 open (wt,"<$file_wt") || die "$file_wt not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
123 open (treated,"<$file_treat") || die "$file_treat not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
124 open (output,">$file_output") || die "bed_$file_wt not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
125 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
126 print output "$header"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
127 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
128 print "Comparison --> probe_selection=$tipo, Normalization=$normalization_q, summary method=$sum_meth Filters: p-value=$pv_cut, raw value=$media_cut, FC=$FC_cut"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
129 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
130 while (defined (my $line_down = <annotation>)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
131 chomp $line_down; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
132 my @tmp_down = split("\t", $line_down); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
133 my @probe_match=split("\,", $tmp_down[9]); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
134 foreach $probes (@probe_match){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
135 my @coord=split("-", $probes); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
136 $tab_tot{$tmp_down[0]}{"$coord[0]\t$coord[1]"}.="$tmp_down[1]\n$tmp_down[7]\n$tmp_down[0]\n$tmp_down[2]\n$tmp_down[3]\n$tmp_down[4]\n$tmp_down[5]\n$tmp_down[6]\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
137 push(@ciclo,"$tmp_down[0]\t$coord[0]\t$coord[1]"); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
138 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
139 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
140 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
141 while (defined (my $line_down = <wt>)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
142 chomp $line_down; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
143 my @tmp_down = split("\t", $line_down); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
144 chomp $tmp_down[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
145 $tab_tot_wt{"$tmp_down[0]\t$tmp_down[3]"}=$tmp_down[5]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
146 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
147 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
148 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
149 while (defined (my $line_down = <treated>)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
150 chomp $line_down; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
151 my @tmp_down = split("\t", $line_down); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
152 chomp $tmp_down[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
153 $tab_tot_treat{"$tmp_down[0]\t$tmp_down[3]"}=$tmp_down[5]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
154 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
155 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
156 if($normalization_q eq "yes"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
157 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
158 @sort_wt=sort{$tab_tot_wt{$a} <=> $tab_tot_wt{$b}} keys %tab_tot_wt; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
159 @sort_treat=sort{$tab_tot_treat{$a} <=> $tab_tot_treat{$b}} (keys %tab_tot_treat); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
160 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
161 for($i=0;$i<=$#sort_wt;$i++){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
162 $media=($tab_tot_wt{$sort_wt[$i]}+$tab_tot_treat{$sort_treat[$i]})/2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
163 $tab_tot_value{$sort_wt[$i]}.="$media\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
164 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
165 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
166 for($i=0;$i<=$#sort_treat;$i++){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
167 $media=($tab_tot_wt{$sort_wt[$i]}+$tab_tot_treat{$sort_treat[$i]})/2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
168 $tab_tot_value{$sort_treat[$i]}.="$media\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
169 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
170 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
171 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
172 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
173 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
174 foreach $key_value(@ciclo){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
175 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
176 @keys_values=split("\t",$key_value); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
177 @array1= split("\n",$tab_tot{$keys_values[0]}{"$keys_values[1]\t$keys_values[2]"}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
178 if($normalization_q eq "yes"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
179 @array2= split("\n",$tab_tot_value{"$keys_values[1]\t$keys_values[2]"}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
180 $value1=$array2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
181 $value2=$array2[1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
182 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
183 else{ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
184 $value1=$tab_tot_wt{"$keys_values[1]\t$keys_values[2]"}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
185 $value2=$tab_tot_treat{"$keys_values[1]\t$keys_values[2]"}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
186 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
187 if ($tipo eq "internal_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
188 $prendo = "^exon"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
189 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
190 if ($tipo eq "all_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
191 $prendo = "exon"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
192 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
193 if ($tipo eq "last_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
194 $prendo = "exon last"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
195 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
196 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
197 if ((!($array1[0] eq "")) && ($array1[1] =~ /$prendo/g)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
198 if ($data_log eq "no_log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
199 $log1=log($value1)/log(2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
200 $log2=log($value2)/log(2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
201 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
202 if ($data_log eq "log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
203 $log1=$value1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
204 $log2=$value2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
205 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
206 $tab_gene_wt{"$array1[0]\t$array1[2]\t$array1[3]\t$array1[4]\t$array1[5]\t$array1[6]"}.="$log1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
207 $tab_gene_tratted{"$array1[0]\t$array1[2]\t$array1[3]\t$array1[4]\t$array1[5]\t$array1[6]"}.="$log2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
208 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
209 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
210 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
211 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
212 foreach $key (keys %tab_gene_wt) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
213 @r1=split("\n",$tab_gene_wt{$key}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
214 @r2=split("\n",$tab_gene_tratted{$key}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
215 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
216 sort {$a <=> $b} (@r1); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
217 sort {$a <=> $b} (@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
218 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
219 if ($#r1>0){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
220 my $ttest = new Statistics::TTest; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
221 $ttest->set_significance(95); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
222 $ttest->load_data(\@r1,\@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
223 my $s1=$ttest->{s1}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
224 my $s2=$ttest->{s2}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
225 $media1=$s1->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
226 $media2=$s2->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
227 $total_probes=$#r1+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
228 $potenza_a=$media2-$media1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
229 $FCa=((2)**$potenza_a); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
230 if( (@r1 % 2) == 1 ) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
231 $median1 = $r1[((@r1+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
232 $median2 = $r2[((@r2+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
233 } else { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
234 $median1 = ($r1[(@r1 / 2)-1] + $r1[@r1 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
235 $median2 = ($r2[(@r2 / 2)-1] + $r2[@r2 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
236 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
237 $potenza_m=$median2-$median1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
238 $FCm=((2)**$potenza_m); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
239 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
240 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
241 if ($FCa<1){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
242 $FCa=(-(1/$FCa)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
243 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
244 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
245 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
246 if ($FCm<1){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
247 $FCm=(-(1/$FCm)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
248 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
249 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
250 if ((($media1<$media_cut) && ($media2<$media_cut)) || ($FC_cut>=abs($FCa))){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
251 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
252 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
253 $p_value{"$key\t$media1\t$media2\t$FCa\t$total_probes"}=$ttest->{t_prob}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
254 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
255 #print output "$key\t$media1\t$media2\t$FCa\t",$ttest->{t_prob},"\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
256 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
257 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
258 if ((($media1<$media_cut) && ($media2<$media_cut)) || ($FC_cut>=abs($FCm))){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
259 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
260 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
261 #print output "$key\t$median1\t$median2\t$FCm\t",$ttest->{t_prob},"\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
262 $p_value{"$key\t$median1\t$median2\t$FCm\t$total_probes"}=$ttest->{t_prob}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
263 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
264 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
265 if (($media1<$media_cut) && ($media2<$media_cut)){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
266 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
267 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
268 #print output "$key\t$media1\t$media2\t$FCa\t$median1\t$median2\t$FCm\t",$ttest->{t_prob},"\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
269 $p_value{"$key\t$media1\t$media2\t$FCa\t$median1\t$median2\t$FCm\t$total_probes"}=$ttest->{t_prob}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
270 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
271 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
272 if ($#r1==0){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
273 $media1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
274 $media2=$r2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
275 $median1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
276 $median2=$r2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
277 $potenza=$media2-$media1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
278 $FCa=((2)**$potenza); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
279 $FCm=((2)**$potenza); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
280 if ($FCa<1){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
281 $FCa=(-(1/$FCa)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
282 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
283 if ($FCm<1){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
284 $FCm=(-(1/$FCm)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
285 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
286 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
287 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
288 if (($media1<$media_cut) && ($media2<$media_cut)){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
289 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
290 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
291 $p_value{"$key\t$media1\t$media2\t$FCa\t$median1\t$median2\t$FCm\t$total_probes"}=1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
292 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
293 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
294 if ((($media1<$media_cut) && ($media2<$media_cut)) || ($FC_cut>=abs($FCa))){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
295 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
296 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
297 $p_value{"$key\t$media1\t$media2\t$FCa\t$total_probes"}=1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
298 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
299 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
300 if ((($media1<$media_cut) && ($media2<$media_cut)) || ($FC_cut>=abs($FCm))){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
301 next; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
302 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
303 $p_value{"$key\t$median1\t$median2\t$FCm\t$total_probes"}=1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
304 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
305 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
306 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
307 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
308 @sort_pvalue=sort{$p_value{$a} <=> $p_value{$b}} keys %p_value; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
309 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
310 if($corretction eq "yes"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
311 for($i=0;$i<=$#sort_pvalue;$i++){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
312 $qvalue=$p_value{$sort_pvalue[$i]}*(($#sort_pvalue+1)/($i+1)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
313 push(@QVALUE, $qvalue); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
314 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
315 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
316 @qvalue_sort = sort {$a <=> $b} @QVALUE; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
317 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
318 for($i=0;$i<=$#sort_pvalue;$i++){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
319 #$FDR=((($i+1)*0.05)/($#sort_pvalue+1)); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
320 $qvalue=shift(@qvalue_sort); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
321 if($qvalue>1){$qvalue=1;} |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
322 if($pv_cut>=$qvalue){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
323 print output "$sort_pvalue[$i]\t$p_value{$sort_pvalue[$i]}\t$qvalue\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
324 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
325 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
326 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
327 if($corretction eq "no"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
328 for($i=0;$i<=$#sort_pvalue;$i++){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
329 if($pv_cut>=$qvalue){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
330 print output "$sort_pvalue[$i]\t$p_value{$sort_pvalue[$i]}\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
331 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
332 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
333 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
334 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
335 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
336 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
337 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
338 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
339 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
340 if($option eq "expr"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
341 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
342 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
343 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
344 \# expression_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
345 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
346 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
347 \# headers: name RefSeq Chr txStart txEnd strand median_chip num_probes_in_gene |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
348 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
349 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
350 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
351 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
352 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
353 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
354 \# expression_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
355 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
356 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
357 \# headers: name RefSeq Chr txStart txEnd strand mean_chip num_probes_in_gene |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
358 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
359 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
360 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
361 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
362 $header=<<e0c6654; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
363 \# annotation_file: $file_ann |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
364 \# expression_file: $file_wt |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
365 \# type of analysis: $tipo |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
366 \# summary method: $sum_meth |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
367 \# headers: name RefSeq Chr txStart txEnd strand mean_chip median_chip num_probes_in_gene |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
368 e0c6654 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
369 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
370 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
371 if (!$file_ann || !$file_wt) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
372 &printusage() |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
373 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
374 my @r1=(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
375 my @r2=(); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
376 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
377 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
378 open (annotation,"<$file_ann") || die "file_ann not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
379 open (wt,"<$file_wt") || die "$file_wt not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
380 open (output,">$file_output") || die "bed_$file_wt not open:$!\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
381 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
382 print output "$header"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
383 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
384 print "Expression --> probe_selection=$tipo summary method=$sum_meth"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
385 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
386 while (defined (my $line_down = <annotation>)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
387 chomp $line_down; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
388 my @tmp_down = split("\t", $line_down); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
389 my @probe_match=split("\,", $tmp_down[9]); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
390 foreach $probes (@probe_match){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
391 my @coord=split("-", $probes); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
392 $tab_tot{$tmp_down[0]}{"$coord[0]\t$coord[1]"}.="$tmp_down[1]\n$tmp_down[7]\n$tmp_down[0]\n$tmp_down[2]\n$tmp_down[3]\n$tmp_down[4]\n$tmp_down[5]\n$tmp_down[6]\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
393 push(@ciclo,"$tmp_down[0]\t$coord[0]\t$coord[1]"); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
394 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
395 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
396 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
397 while (defined (my $line_down = <wt>)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
398 chomp $line_down; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
399 $line_down=~ s/ //g; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
400 my @tmp_down = split("\t", $line_down); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
401 chomp $tmp_down[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
402 $tab_tot_wt{"$tmp_down[0]\t$tmp_down[3]"}=$tmp_down[5]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
403 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
404 #@sort_wt=sort{$tab_tot_wt{$a} <=> $tab_tot_wt{$b}} keys %tab_tot_wt; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
405 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
406 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
407 #print "ciclo = $ciclo[0]\t$ciclo[1]\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
408 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
409 foreach $key_value(@ciclo){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
410 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
411 @keys_values=split("\t",$key_value); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
412 @array1= split("\n",$tab_tot{$keys_values[0]}{"$keys_values[1]\t$keys_values[2]"}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
413 @array2= split("\n",$tab_tot_wt{"$keys_values[1]\t$keys_values[2]"}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
414 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
415 if ($tipo eq "internal_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
416 $prendo = "^exon"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
417 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
418 if ($tipo eq "all_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
419 $prendo = "exon"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
420 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
421 if ($tipo eq "last_exon"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
422 $prendo = "exon last"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
423 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
424 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
425 if ((!($array1[0] eq "")) && ($array1[1] =~ /$prendo/g)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
426 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
427 if ($data_log eq "no_log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
428 $log1=log($array2[0])/log(2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
429 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
430 if ($data_log eq "log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
431 $log1=$array2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
432 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
433 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
434 $tab_gene_wt{"$array1[0]\t$array1[2]\t$array1[3]\t$array1[4]\t$array1[5]\t$array1[6]"}.="$log1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
435 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
436 if ((!($array1[0] eq "")) && ($array1[1] =~ /intron/g)) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
437 if ($data_log eq "no_log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
438 $log1=log($array2[0])/log(2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
439 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
440 if ($data_log eq "log"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
441 $log1=$array2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
442 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
443 $tab_intron_wt{"$array1[0]\t$array1[2]\t$array1[3]\t$array1[4]\t$array1[5]\t$array1[6]"}.="$log1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
444 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
445 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
446 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
447 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
448 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
449 foreach $key (keys %tab_gene_wt) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
450 @r1=split("\n",$tab_gene_wt{$key}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
451 if (exists $tab_intron_wt{$key}){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
452 @r2=split("\n",$tab_intron_wt{$key}); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
453 sort {$a <=> $b} (@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
454 }else{ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
455 @r2=("no"); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
456 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
457 sort {$a <=> $b} (@r1); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
458 if ($#r2>0) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
459 if ($#r1>0) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
460 my $ttest = new Statistics::TTest; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
461 $ttest->set_significance(95); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
462 $ttest->load_data(\@r1,\@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
463 my $s1=$ttest->{s1}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
464 my $s2=$ttest->{s2}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
465 $media1=$s1->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
466 $media2=$s2->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
467 $total_probes=$#r1+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
468 $total_probes2=$#r2+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
469 if( (@r1 % 2) == 1 ) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
470 $median1 = $r1[((@r1+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
471 } else { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
472 $median1 = ($r1[(@r1 / 2)-1] + $r1[@r1 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
473 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
474 if( (@r2 % 2) == 1 ) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
475 $median2 = $r2[((@r2+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
476 } else { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
477 $median2 = ($r2[(@r2 / 2)-1] + $r2[@r2 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
478 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
479 if($media1>=$media2){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
480 $pvalue=$ttest->{t_prob}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
481 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
482 if($media1<$media2){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
483 $pvalue=1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
484 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
485 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
486 print output "$key\t$media1\t$media2\t$pvalue\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
487 #print output "$key\t$media1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
488 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
489 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
490 print output "$key\t$median1\t$median2\t$pvalue\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
491 #print output "$key\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
492 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
493 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
494 print output "$key\t$media1\t$media2\t$median1\t$median2\t$pvalue\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
495 #print output "$key\t$media1\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
496 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
497 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
498 if ($#r1==0) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
499 @r1=@r2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
500 my $ttest = new Statistics::TTest; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
501 $ttest->set_significance(95); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
502 $ttest->load_data(\@r1,\@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
503 my $s2=$ttest->{s2}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
504 $media2=$s2->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
505 $total_probes=1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
506 $total_probes2=$#r2+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
507 $media1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
508 $median1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
509 if( (@r2 % 2) == 1 ) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
510 $median2 = $r2[((@r2+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
511 } else { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
512 $median2 = ($r2[(@r2 / 2)-1] + $r2[@r2 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
513 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
514 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
515 print output "$key\t$media1\t$media2\tNA\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
516 #print output "$key\t$media1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
517 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
518 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
519 print output "$key\t$median1\t$median2\tNA\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
520 #print output "$key\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
521 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
522 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
523 print output "$key\t$media1\t$media2\t$median1\t$median2\tNA\t$total_probes\t$total_probes2\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
524 #print output "$key\t$media1\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
525 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
526 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
527 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
528 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
529 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
530 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
531 if ($r2[0] eq "no") { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
532 if ($#r1>0) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
533 @r2=@r1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
534 my $ttest = new Statistics::TTest; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
535 $ttest->set_significance(95); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
536 $ttest->load_data(\@r1,\@r2); |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
537 my $s1=$ttest->{s1}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
538 $media1=$s1->{mean}; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
539 $total_probes=$#r1+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
540 if( (@r1 % 2) == 1 ) { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
541 $median1 = $r1[((@r1+1) / 2)-1]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
542 } else { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
543 $median1 = ($r1[(@r1 / 2)-1] + $r1[@r1 / 2]) / 2; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
544 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
545 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
546 if ($#r==0){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
547 $media1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
548 $median1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
549 $total_probes=$#r1+1; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
550 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
551 $media2=0; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
552 $median2=0; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
553 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
554 print output "$key\t$media1\t$media2\t$median1\t$median2\tNA\t$total_probes\t0\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
555 #print output "$key\t$media1\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
556 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
557 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
558 print output "$key\t$media1\t$media2\tNA\t$total_probes\t0\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
559 #print output "$key\t$media1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
560 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
561 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
562 print output "$key\t$median1\t$median2\tNA\t$total_probes\t0\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
563 #print output "$key\t$median1\t$total_probes\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
564 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
565 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
566 if (($#r2 == 0) && ($r2[0] ne "no") && ($#r1==0)){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
567 $media1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
568 $media2=$r2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
569 $median1=$r1[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
570 $median2=$r2[0]; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
571 if ($sum_meth eq "both"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
572 print output "$key\t$media1\t$media2\t$median1\t$median2\tNA\t1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
573 #print output "$key\t$media1\t$median1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
574 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
575 if ($sum_meth eq "mean"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
576 print output "$key\t$media1\t$media2\tNA\t1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
577 #print output "$key\t$media1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
578 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
579 if ($sum_meth eq "median"){ |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
580 print output "$key\t$median1\t$median2\tNA\t1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
581 #print output "$key\t$median1\t1\n"; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
582 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
583 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
584 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
585 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
586 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
587 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
588 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
589 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
590 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
591 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
592 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
593 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
594 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
595 #################################################################################################################################### |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
596 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
597 sub printusage { |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
598 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
599 print<<eoc22334; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
600 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
601 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
602 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
603 *************************************************************** |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
604 :: N i m b l e G e n E x p r e s s i o n A n a l y s i s :: |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
605 *************************************************************** |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
606 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
607 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
608 USAGE SUMMARY |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
609 --------------------------------------------------------------------------------- |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
610 This program utilizes NimbleGen ratio files in gff format as INPUT FILE and |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
611 provides a table of the computed picks in the same gff file format. |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
612 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
613 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
614 --ann annotation file |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
615 --wt wild type file |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
616 --treat treated file |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
617 --pv p-value cut-off |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
618 --rc raw signal cut-off |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
619 --fc fold change cut-toff |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
620 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
621 ----------------------------------------------------------------------------------------- |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
622 EXAMPLES: |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
623 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
624 perl program.pl --in 75340_ratio.gff --perc 0.98 --t s --num 3 --dist 250 --w 500 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
625 OR |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
626 perl program.pl --in 75340_ratio.gff --perc 0.98 --t p --log 5 --num 3 --dist 250 --w 500 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
627 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
628 ----------------------------------------------------------------------------------------- |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
629 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
630 eoc22334 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
631 exit 0; |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
632 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
633 } |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
634 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
635 |
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
matces
parents:
diff
changeset
|
636 |