annotate SNiPloid.pl @ 0:e94de0ea3351 draft default tip

Uploaded
author dereeper
date Wed, 11 Sep 2013 09:08:15 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1 #!/usr/bin/perl
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
3 use Getopt::Long;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
4 use Switch;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
5 use Tie::File;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
6
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
7 #####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
8 # #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
9 # @@@@ @ @ @ @@@@ @ @ @ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
10 # @ @@ @ @ @ @ @ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
11 # @@@ @ @ @ @ @@@@ @ @@@ @ @@@@ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
12 # @ @ @@ @ @ @ @ @ @ @ @ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
13 # @@@@ @ @ @ @ @ @@@ @ @@@ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
14 # #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
15 #####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
16
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
17 ###############################################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
18 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
19 # SNiPloid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
20 # Author : Marine PERALTA
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
21 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
22 ###############################################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
23 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
24 # Galaxy Version
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
25 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
26 ###############################################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
27
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
28 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
29 # Samples names
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
30 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
31 $polyploidName = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
32 $polyploid2Name = "" ; #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
33 $genome1Name = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
34 $genome2Name = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
35 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
36 # VCF files
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
37 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
38 $VCFpolyploid = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
39 $VCFpolyploid2 = "" ; #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
40 $VCFgenome1 = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
41 $VCFgenome2 = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
42 $merged_VCF = "" ; # Polyploid + Genome1 + Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
43 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
44 # Depth of Coverage File
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
45 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
46 $DOCpolyploid = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
47 $DOCpolyploid2 = "" ; #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
48 $DOCgenome1 = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
49 $DOCgenome2 = "" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
50 $merged_DOC = "" ; # Polyploid + Genome1 + Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
51 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
52 # Depth for each sample
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
53 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
54 $depthPolyploid = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
55 $depthPolyploid2 = 0 ; #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
56 $depthGenome1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
57 $depthGenome2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
58 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
59 # Output Files
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
60 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
61 $SNP_csv = "SNP_tab.txt";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
62 $SNP_html = "SNP_view.html";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
63 $SNP_count = "SNP_synthesis_tab.html";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
64 $SNP_count_csv = "SNP_synthesis_tab.txt";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
65 #___________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
66 # Other parameters
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
67 #-----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
68 $enableLowQuality = 0 ; #default value for enable quality SNP = only PASS SNP are considered
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
69 $ref = 0 ; # default parameter = extern
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
70
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
71 $filtre_ouPas = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
72 $value_filter_p1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
73 $value_filter_p2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
74
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
75 $REPimages = "img_sniploid/";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
76
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
77 $poly_poly_analysis = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
78
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
79
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
80 my $usage = qq~
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
81 Basic usage
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
82
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
83 For comparison between a polyploid and its parental diploid genomes:
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
84
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
85 $0 --vp <VCF_polyploid> --vg1 <VCF_diploid> --cpp <depth_polyploid> --cg1 <depth_diploid> --dp <min_depth_polyploid> --dg1 <min_depth_diploid> --ref 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
86
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
87 For comparison between 2 polyploids:
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
88
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
89 $0 --vp <VCF_polyploid1> --vp2 <VCF_polyploid2> --cpp <depth_polyploid1> --cpp2 <depth_polyploid2> --dp <min_depth_polyploid1> --dp2 <min_depth_polyploid2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
90
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
91 Usage:$0 <args>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
92 where <args> are:
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
93
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
94 --vp <VCF file for polyploid>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
95 --vp2 <VCF file for polyploid 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
96 --vg1 <VCF file for diploid genome 1>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
97 --vg2 <VCF file for diploid genome 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
98
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
99 --cpp <Depth file for polyploid>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
100 --cpp2 <Depth file for polyploid 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
101 --cg1 <Depth file for diploid genome 1>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
102 --cg2 <Depth file for diploid genome 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
103
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
104 --dp <Minimum read depth at a position to make a call for polyploid>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
105 --dp2 <Minimum read depth at a position to make a call for polyploid 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
106 --dg1 <Minimum read depth at a position to make a call for diploid genome 1>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
107 --dg2 <Minimum read depth at a position to make a call for diploid genome 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
108
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
109 --oc <Output file name for SNP list in csv>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
110 --oh <Output file name for SNP list in HTML>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
111 --ocs <Output file name for SNP count per gene in csv>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
112 --ohs <Output file name for SNP count per gene in HTML>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
113
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
114 --vfp1 <Minimul allele frequency to consider as variant for polyploid 1 (in %). Default: 0>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
115 --vfp2 <Minimul allele frequency to consider as variant for polyploid 2 (in %). Default: 0>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
116
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
117 --elq <Enable low quality SNP tag. Default: 0>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
118 --gn2 <Specify a name for diploid genome 2>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
119 --ref <The reference must be included in the analysis as diploid genome. Default: 0>
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
120 ~;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
121 $usage .= "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
122
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
123
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
124 =pod
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
125 Add option for "Heterozygosity"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
126 Enable "heterozygosity" for genome 1 (reference intern) - not necessary...
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
127 Enable "heterozygosity" for genome 1 and genome 2 (reference extern)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
128 =cut
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
129
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
130 GetOptions (
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
131 # "pn=s" => \$polyploidName,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
132 # "pn2=s" => \$polyploid2Name, #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
133 # "gn1=s" => \$genome1Name,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
134 "gn2=s" => \$genome2Name,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
135 "vp=s" => \$VCFpolyploid,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
136 "vp2=s" => \$VCFpolyploid2, #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
137 "vg1=s" => \$VCFgenome1,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
138 "vg2=s" => \$VCFgenome2,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
139 "vm=s" => \$merged_VCF,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
140 "cpp=s" => \$DOCpolyploid,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
141 "cpp2=s" => \$DOCpolyploid2, #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
142 "cg1=s" => \$DOCgenome1,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
143 "cg2=s" => \$DOCgenome2,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
144 "cm=s" => \$merged_DOC,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
145 "dp=i" => \$depthPolyploid,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
146 "dp2=i" => \$depthPolyploid2, #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
147 "dg1=i" => \$depthGenome1,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
148 "dg2=i" => \$depthGenome2,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
149 "oc=s" => \$SNP_csv,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
150 "oh=s" => \$SNP_html,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
151 "ohs=s" => \$SNP_count,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
152 "ocs=s" => \$SNP_count_csv,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
153 "elq=i" => \$enableLowQuality,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
154 "ref=i" => \$ref,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
155 #"fop=i" => \$filtre_ouPas,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
156 "vfp1=i" => \$value_filter_p1,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
157 "vfp2=i" => \$value_filter_p2,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
158 "img=s" => \$REPimages
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
159 # h = i = > \ $heterozygosity ,
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
160 );
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
161
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
162
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
163 # Validation - Samples names
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
164
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
165
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
166 die $usage
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
167 if ( (!$VCFgenome1 || !$DOCgenome1 ) && (!$VCFpolyploid || !$DOCpolyploid) || (!$VCFpolyploid2 || !$DOCpolyploid2 ) && (!$VCFpolyploid || !$DOCpolyploid));
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
168
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
169
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
170
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
171 %intervalle1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
172 %intervalle2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
173 %snp = () ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
174 my %snp_final ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
175 my %five = () ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
176 my %phased_regions = () ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
177
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
178 $nbTotGenes = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
179 $nbTotGenesVal = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
180 $nbTotGenesAna = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
181
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
182
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
183 if ($VCFpolyploid2 ne "") {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
184 $poly_poly_analysis = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
185 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
186
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
187 # if ($polyploidName eq "") {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
188 # print STDOUT "*** /!\\ ERROR: Missing name for polyploid - You have to specify a name for the polyploid species [--pn \"polyploid_name\"] $!" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
189 # die ("*** /!\\ ERROR: Missing name for polyploid - You have to specify a name for the polyploid species [--pn \"polyploid_name\"] $!") ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
190 # }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
191
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
192 if ($poly_poly_analysis == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
193 print STDOUT "\nAnalysis Type: Polyploid vs Polyploid\n---------------------------------------";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
194 # print STDOUT "\nPolyploid 1: ".$polyploidName ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
195 # print STDOUT "\nPolyploid 2:".$polyploid2Name ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
196 # if ($polyploid2Name eq "") {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
197 # print STDOUT "*** /!\\ ERROR: Missing name for polyploid 2 - You have to specify a name for the polyploid species 2 [--pn2 \"polyploid_2_name\"] $!" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
198 # die ("*** /!\\ ERROR: Missing name for polyploid - You have to specify a name for the polyploid species 2 [--pn \"polyploid_2_name\"] $!") ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
199 # }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
200 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
201 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
202 print STDOUT "\nAnalysis Type: Polyploid vs Parental Genomes\n---------------------------------------";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
203 # print STDOUT "\nPolyploid: ".$polyploidName ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
204 # print STDOUT "\nGenome 1: ".$genome1Name ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
205 # print STDOUT "\nGenome 2: ".$genome2Name ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
206 # if ($genome1Name eq "") {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
207 # die ("*** /!\\ ERROR: Missing name for genome 1 - You have to specify a name for the genome 1 species") ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
208 # }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
209 # if ($genome2Name eq "") {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
210 # die ("*** /!\\ ERROR: Missing name for genome 2 - You have to specify a name for the genome 2 species") ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
211 # }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
212 # Validation - depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
213 if ($depthPolyploid == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
214 die ("*** /!\\ ERROR: Missing depth information for polyploid");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
215 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
216 if ($depthGenome1 == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
217 die ("*** /!\\ ERROR: Missing depth information for genome 1");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
218 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
219 if ($ref == 0 && $depthGenome2 == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
220 die ("*** /!\\ ERROR: Missing depth information for genome 2");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
221 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
222 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
223
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
224
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
225
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
226
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
227 $time = time ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
228
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
229
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
230 ################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
231 # 1) Polyploid vs Polyploid analysis
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
232 ################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
233 if ($poly_poly_analysis == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
234 #print STDOUT "\n PASS";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
235 &Intervall_part1($DOCpolyploid) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
236 &Intervall_part2($DOCpolyploid2,$depthPolyploid2) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
237
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
238 &VCF_Analysis($VCFpolyploid);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
239 &VCF_Analysis($VCFpolyploid2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
240 # CSS, titles, img, etc.
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
241 &intro_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
242 &poly_poly_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
243 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
244 ################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
245 # 2) Polyploid vs Parental Diploid Genomes Analysis
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
246 ################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
247 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
248
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
249 # PART 1 : CREATING COMMON INTERVALS
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
250
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
251 &Intervall_part1($DOCpolyploid) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
252 &Intervall_part2($DOCgenome1,$depthGenome1) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
253 if ($ref == 0) { # genome2 => no parental genome as reference
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
254 &Intervall_part2($DOCgenome2,$depthGenome2) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
255 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
256
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
257 # PART 2 and 3 : CREATING SNP TAB AND OUTPUTS
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
258
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
259 # VCF_Analysis : Create SNP hash and phasing
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
260
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
261 &VCF_Analysis($VCFpolyploid);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
262 if ($ref == 1) { # Reference = one of two parental genomes
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
263 &VCF_Analysis($VCFgenome1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
264 # CSS, titles, img, etc.
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
265 &intro_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
266 # SNP Comparison and display
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
267 &int_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
268 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
269 else { # Extern Reference
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
270 &VCF_Analysis($VCFgenome1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
271 &VCF_Analysis($VCFgenome2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
272 # CSS, titles, img, etc.
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
273 &intro_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
274 # SNP Comparison and display
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
275 &ext_output ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
276 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
277 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
278
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
279
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
280
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
281
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
282 sub Intervall_part1 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
283 my(@args) = @_;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
284 #print STDOUT "\nTEST ::: ".$args[0] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
285 open (TABSNP, $args[0]) or die ("Pbm a l'ouverture du fichier : $args[0]");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
286 @DOC = <TABSNP> ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
287 close TABSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
288
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
289 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
290 $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
291 $val_deb = "";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
292 $val_fin = "";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
293 $name_pre = "";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
294
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
295
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
296 foreach $line(@DOC) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
297 if ($line ne $DOC[0]) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
298 @ligne = split(/\t/ , $line);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
299 @position = split(/:/ , $ligne[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
300 $name_gene = $position[0] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
301
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
302 if ($merged == 0) { # 1st File - Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
303 $depthcov = $ligne[1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
304 if ($name_gene){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
305 if ($name_gene ne $gene_pre)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
306 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
307 if ($rec == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
308 $position_fin = $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
309 $val_fin = $val_deb.$position_fin ; # Intervalle end position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
310 $intervalle1{$gene_pre}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
311 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
312 $rec = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
313 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
314 if ($depthcov >= $depthPolyploid){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
315 if ($rec == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
316 $position_deb = $position[1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
317 $val_deb = $position_deb."-"; # Intervalle start position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
318 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
319 $rec = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
320 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
321 if ($depthcov < $depthPolyploid){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
322 if ($rec == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
323 $position_fin = $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
324 $val_fin = $val_deb.$position_fin ; # Intervalle end position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
325 $intervalle1{$gene_pre}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
326 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
327 $rec = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
328 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
329
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
330 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
331 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
332 else { # Merged files (2 or 3 species)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
333 if ($ref == 0) { # 3 species
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
334 $depthcov1 = $ligne[$indiceGenome2] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
335 $depthcov2 = $ligne[$indicePolyploid1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
336 $depthcov3 = $ligne[$indiceGenome1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
337 if ($name_gene){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
338 if (($depthcov1 >= $depthGenome2) && ($depthcov2 >= $depthPolyploid)&& ($depthcov3 >= $depthGenome1)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
339 if ($rec == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
340 $position_deb = $position[1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
341 $val_deb = $position_deb."-";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
342 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
343 $rec = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
344 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
345 if (($depthcov1 < $depthGenome2) || ($depthcov2 < $depthPolyploid) || ($depthcov3 < $depthGenome1)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
346 if ($rec == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
347 $position_fin = $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
348 $val_fin = $val_deb.$position_fin ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
349 $intervalle1{$gene_pre}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
350 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
351 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
352 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
353 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
354 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
355 else { # 2 species
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
356 $depthcov1 = $ligne[$indicePolyploid1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
357 $depthcov2 = $ligne[$indiceGenome1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
358 if ($name_gene){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
359 if (($depthcov1 >= $depthPolyploid) && ($depthcov2 >= $depthGenome1)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
360 if ($rec == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
361 $position_deb = $position[1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
362 $val_deb = $position_deb."-";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
363 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
364 $rec = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
365 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
366 if (($depthcov1 < $depthPolyploid) || ($depthcov2 < $depthGenome1)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
367 if ($rec == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
368 $position_fin = $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
369 $val_fin = $val_deb.$position_fin ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
370 $intervalle1{$gene_pre}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
371 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
372 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
373 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
374 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
375 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
376 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
377 $position_pre = $position[1] ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
378 $gene_pre = $name_gene ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
379 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
380 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
381 return (%intervalle1) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
382
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
383 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
384 sub Intervall_part2 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
385
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
386 my(@args) = @_;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
387 #print "\nintervall part 2 : $args[1]";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
388
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
389 open (TABSNP, $args[0]) or die ("Pbm a l'ouverture du fichier : $args[0]");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
390 #print STDOUT "\n$args[0]";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
391 @DOC = <TABSNP> ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
392 my %tab ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
393 foreach $li(@DOC) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
394 if ($li =~ /^(.+):(.+)\t(.+)\t.+\t.+$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
395 $tab{$1}{$2} = $3;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
396 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
397 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
398 close TABSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
399
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
400
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
401
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
402 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
403 $position_pre ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
404 $val_deb = "";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
405 $val_fin = "";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
406
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
407 foreach my $interval(sort (keys(%intervalle1))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
408
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
409 my $ref = $intervalle1{$interval};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
410 my %intervalls = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
411 $name_gene = $interval ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
412
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
413 foreach my $intervall(sort (keys(%intervalls))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
414 $final = 2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
415 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
416 ($debut,$fin) = split(/-/,$intervall);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
417 for ($i=$debut; $i <=$fin; $i++) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
418 if ($tab{$interval}{$i} >= $args[1]){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
419 if ($rec == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
420 $position_deb = $i ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
421 $val_deb = $position_deb."-";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
422 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
423 $rec = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
424 $final = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
425 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
426 if ($tab{$interval}{$i} < $args[1]){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
427 $final = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
428 if ($rec == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
429 $position_fin = $i-1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
430 $val_fin = $val_deb.$position_fin ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
431 $intervalle2{$name_gene}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
432 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
433 $rec = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
434 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
435 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
436 if ($final == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
437 $val_fin = $val_deb.$fin ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
438 $intervalle2{$name_gene}{$val_fin} = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
439 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
440 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
441 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
442 if ($VCFgenome2 ne ""){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
443 %intervalle1 = %intervalle2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
444 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
445
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
446 foreach my $interval(sort (keys(%intervalle2))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
447 my $ref = $intervalle2{$interval};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
448 my %intervalls = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
449 $name_gene = $interval ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
450 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
451 return (%intervalle2) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
452 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
453
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
454 sub VCF_Analysis {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
455 %snp_final = () ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
456 $compt_phasing = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
457 $compt_five = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
458 my(@args) = @_;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
459
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
460 open (TABSNP, "$args[0]") or die ("ERROR : file $args[0] don't exists");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
461 @VCF = <TABSNP> ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
462 close TABSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
463
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
464 ###########################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
465 # test if VCF was filtered
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
466 ###########################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
467 my $vcf_file = $args[0];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
468 my $grep_pass = `grep -c 'PASS' $vcf_file`;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
469 chomp($grep_pass);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
470 my $pass = "PASS";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
471 if (defined $grep_pass && $grep_pass == 0)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
472 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
473 $pass = ".";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
474 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
475
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
476 #print "$pass $grep_pass $vcf_file\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
477
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
478 foreach $line(@VCF){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
479 if ($line =~ /^#CHROM.+FORMAT\t(.+)$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
480 $name_record = $1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
481 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
482 if ($line !~ /^#/){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
483 @infos_line = split(/\t/,$line) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
484 $gene = $infos_line[0];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
485 $position = $infos_line[1];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
486 $ref_allele = $infos_line[3];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
487 $alt_allele = $infos_line[4];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
488
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
489 if ($ref_allele =~/\w\w/ or $alt_allele =~/\w\w/)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
490 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
491 next;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
492 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
493
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
494 $snp_code = "[$ref_allele/$alt_allele]";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
495 $quality_of_snp = $infos_line[6];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
496 $depth_recuperation = $infos_line[7];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
497 $alleles = $infos_line[9];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
498
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
499 ($GT,$AD,$FDP,$GQ,$PL) = split(":",$alleles);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
500
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
501
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
502 # PHASING
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
503
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
504 if (($GT =~ /\|/) && ($previous_GT =~ /\//)) { # initialisation région
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
505 $compt_phasing ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
506 $phased_regions{$gene}{$compt_phasing}{$previous_position} = $previous_GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
507 $phased_regions{$gene}{$compt_phasing}{$position} = $GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
508 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
509 if (($GT =~ /\|/) && ($previous_GT =~ /\|/)) { # extension région
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
510 $phased_regions{$gene}{$compt_phasing}{$position} = $GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
511 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
512
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
513
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
514 # $FDP = Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
515 # $DP = Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
516
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
517 my $DP;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
518 my @tags = split(";",$depth_recuperation);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
519 foreach my $tag(@tags)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
520 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
521 if ($tag =~/DP=/)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
522 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
523 $DP = $tag;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
524 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
525 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
526
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
527 #($sub1,$sub2) = split(",",$AD);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
528 #$somme = $sub1 + $sub2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
529
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
530 $somme = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
531 my @depth_of_alleles = split(",",$AD);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
532 my $sub1 = $depth_of_alleles[0];
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
533 foreach my $depth_of_allele(@depth_of_alleles)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
534 {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
535 $somme += $depth_of_allele;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
536 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
537
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
538
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
539
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
540 if ($somme == 0 ) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
541 print STDOUT "ERROR : Cannot calculate ratio for ".$gene." [pos:".$position."]\n\"".$line."\"";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
542 die ("ERROR : Cannot calculate ratio for ".$gene." [pos:".$position."]\n\"".$line."\"");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
543 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
544 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
545 $ratio = ($sub1/$somme)*100;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
546 $ratio = sprintf("%.0f", $ratio);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
547 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
548
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
549 @DP = split ("=",$DP) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
550
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
551 $test_inside_interval = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
552
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
553 my $ref = $intervalle2{$gene};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
554 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
555
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
556 foreach my $interval(keys(%hash)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
557 my @pos = split(/-/,$interval) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
558 if ($position >= $pos[0] && $position <= $pos[1]) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
559 $test_inside_interval = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
560 last ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
561 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
562 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
563 # ENABLE LOW_QUALITY SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
564 if ($enableLowQuality == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
565 if ($test_inside_interval == 1 ){ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
566 if ($args[0] eq $VCFpolyploid) { # Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
567 $polyploidName = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
568 $snp{$gene}{$position} = $snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
569 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
570 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
571 if ($args[0] eq $VCFgenome1) { # genome1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
572 $genome1Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
573 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
574 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
575
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
576 ($code_snp,$ratio,$GT_poly,$DP_P,$code_G1,$GT_G1) = split(/\t/,$snp{$gene}{$position});
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
577 @recupAlleles = split(/\[/,$code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
578 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
579 ($alRef,$alAltP) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
580 @recupAlleles = split(/\[/,$code_G1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
581 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
582 ($alRef,$code_G1) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
583
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
584 #print "\nINFOS\n".$GT_poly."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
585 #print $GT_G1."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
586 #print $code_G1."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
587 #print $alAltP."\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
588 if ((($GT_poly =~ /^0.1$/)||($GT_poly =~ /^1.0$/)) && (($GT_G1 =~ /^1.1$/)) && ($code_G1 eq $alAltP)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
589 $five{$gene}{$position} = $GT_poly ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
590 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
591 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
592 else { # if no polyploid SNP, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
593 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
594 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
595 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
596 else { # genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
597 if ($args[0] eq $VCFgenome2) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
598 $genome2Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
599 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
600 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$GT;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
601 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
602 else { # if no polyploid SNP and no genome1, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
603 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$ref_allele."\t\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
604 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
605 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
606 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
607 if ($args[0] eq $VCFpolyploid2) { # polyploid2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
608 $polyploid2Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
609 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
610 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
611 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
612 else { # if no polyploid SNP, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
613 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
614 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
615 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
616 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
617 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
618 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
619 # ONLY PASS SNP CONSIDERED
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
620 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
621 if (($test_inside_interval == 1 ) && ($quality_of_snp eq $pass) && ($snp{$gene}{$position} ne "LQ")){ #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
622 if ($args[0] eq $VCFpolyploid) { # Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
623 $polyploidName = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
624 $snp{$gene}{$position} = $snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
625 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
626 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
627 if ($args[0] eq $VCFgenome1) { # genome1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
628 $genome1Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
629 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
630 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
631
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
632 ($code_snp,$ratio,$GT_poly,$DP_P,$code_G1,$GT_G1) = split(/\t/,$snp{$gene}{$position});
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
633 @recupAlleles = split(/\[/,$code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
634 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
635 ($alRef,$alAltP) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
636 @recupAlleles = split(/\[/,$code_G1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
637 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
638 ($alRef,$code_G1) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
639
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
640 #print "\nINFOS\n".$GT_poly."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
641 #print $GT_G1."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
642 #print $code_G1."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
643 #print $alAltP."\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
644 if ((($GT_poly =~ /^0.1$/)||($GT_poly =~ /^1.0$/)) && (($GT_G1 =~ /^1.1$/)) && ($code_G1 eq $alAltP)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
645 $five{$gene}{$position} = $GT_poly ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
646 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
647 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
648 else { # if no polyploid SNP, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
649 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
650 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
651 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
652 else { # genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
653 if ($args[0] eq $VCFgenome2) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
654 $genome2Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
655 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
656 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$GT;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
657 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
658 else { # if no polyploid SNP and no genome1, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
659 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$ref_allele."\t\t".$snp_code."\t".$GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
660 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
661 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
662 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
663 if ($args[0] eq $VCFpolyploid2) { # polyploid2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
664 $polyploid2Name = $name_record ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
665 if (exists $snp{$gene}{$position}) { # if polyploid SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
666 $snp{$gene}{$position} = $snp{$gene}{$position}."\t".$snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
667 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
668 else { # if no polyploid SNP, key is empty
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
669 $snp{$gene}{$position} = $ref_allele."\t\t\t\t".$snp_code."\t".$AD."\t".$GT."\t".$DP[1]."-".$FDP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
670 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
671 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
672 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
673 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
674 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
675 if ($quality_of_snp ne $pass) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
676 $snp{$gene}{$position} = "LQ";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
677 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
678 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
679 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
680 ################################################################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
681 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
682 $previous_GT = $GT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
683 $previous_position = $position ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
684 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
685 foreach my $s(sort(keys(%snp))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
686 my $ref = $snp{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
687 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
688 foreach my $snip(keys(%hash)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
689 if ($snp{$s}{$snip} ne "LQ"){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
690 $snp_final{$s}{$snip} = $snp{$s}{$snip} ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
691 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
692 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
693 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
694 return (%snp_final) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
695 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
696
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
697 sub intro_output {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
698
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
699 ###########################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
700 # ANALYSE - CREATION FICHIERS DE SORTIE #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
701 ###########################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
702
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
703 # Ouverture des fichiers
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
704 open (HTMLSNP, ">$SNP_html");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
705 open (TABSNP, ">$SNP_csv");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
706 open (HTMLCOUNT, ">$SNP_count");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
707 open (TABCOUNT, ">$SNP_count_csv");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
708
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
709 print HMTL "<html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
710 print HTMLCOUNT "<html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
711
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
712 print HTMLSNP "<head>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
713 print HTMLCOUNT "<head>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
714
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
715 #####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
716 # CSS #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
717 #####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
718 print HTMLSNP "<style type=\"text/css\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
719
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
720 print HTMLSNP "th {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
721 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
722 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
723 print HTMLSNP " border-width:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
724 print HTMLSNP " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
725 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
726
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
727 print HTMLSNP "body {text-align:center;}\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
728
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
729 print HTMLSNP "table {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
730 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
731 print HTMLSNP " margin:auto;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
732 print HTMLSNP " border-collapse: collapse;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
733 print HTMLSNP " border-width:3px; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
734 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
735 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
736
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
737 print HTMLSNP ".bord1 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
738
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
739 print HTMLSNP " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
740 print HTMLSNP " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
741 print HTMLSNP " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
742 print HTMLSNP " border-top:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
743 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
744 print HTMLSNP " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
745 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
746 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
747 print HTMLSNP " background-color : #c6c3bd; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
748 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
749
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
750 print HTMLSNP ".bord2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
751
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
752 print HTMLSNP " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
753 print HTMLSNP " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
754 print HTMLSNP " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
755 print HTMLSNP " border-top:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
756 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
757 print HTMLSNP " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
758 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
759 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
760 print HTMLSNP " background-color : #c6c3ee; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
761 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
762
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
763
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
764 print HTMLSNP "td { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
765 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
766 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
767
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
768 print HTMLSNP ".tdm { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
769 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
770 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
771 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
772
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
773
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
774 print HTMLSNP ".td1 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
775 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
776 print HTMLSNP " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
777 print HTMLSNP " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
778 print HTMLSNP " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
779 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
780 print HTMLSNP " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
781 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
782 print HTMLSNP " background-color : #c6c3bd; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
783 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
784
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
785 print HTMLSNP ".td2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
786 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
787 print HTMLSNP " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
788 print HTMLSNP " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
789 print HTMLSNP " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
790 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
791 print HTMLSNP " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
792 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
793 print HTMLSNP " background-color : #c6c3ee; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
794 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
795
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
796 print HTMLSNP ".ted { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
797 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
798 print HTMLSNP " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
799 print HTMLSNP " background-color : #A19EED; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
800 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
801
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
802 print HTMLSNP ".ted2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
803 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
804 print HTMLSNP " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
805 print HTMLSNP " background-color : #9A9D7C; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
806 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
807
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
808 print HTMLSNP ".tedG { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
809 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
810 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
811 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
812 print HTMLSNP " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
813 print HTMLSNP " background-color : #A19EED; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
814 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
815
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
816 print HTMLSNP ".tedG2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
817 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
818 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
819 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
820 print HTMLSNP " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
821 print HTMLSNP " background-color : #9A9D7C; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
822 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
823
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
824 print HTMLSNP ".final { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
825 print HTMLSNP " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
826 print HTMLSNP " border-right:0px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
827 print HTMLSNP " border-top:0px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
828 print HTMLSNP " border-bottom:0px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
829 print HTMLSNP " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
830 print HTMLSNP " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
831 print HTMLSNP " background-color : white; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
832 print HTMLSNP " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
833
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
834 print HTMLSNP ".auto-style1 {";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
835 print HTMLSNP " font-weight: normal;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
836 print HTMLSNP " font-size: x-small;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
837 print HTMLSNP "}";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
838
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
839
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
840 print HTMLSNP "</style>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
841
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
842 print HTMLCOUNT "<style type=\"text/css\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
843
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
844 print HTMLCOUNT "th {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
845 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
846 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
847 print HTMLCOUNT " border-width:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
848 print HTMLCOUNT " font-family:calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
849 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
850
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
851 print HTMLCOUNT "table {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
852 print HTMLCOUNT " margin:auto;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
853 print HTMLCOUNT " border-collapse: collapse;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
854 print HTMLCOUNT " border-width:3px; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
855 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
856 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
857 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
858
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
859 print HTMLCOUNT ".th {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
860 print HTMLCOUNT " font-weight : normal;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
861 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
862 print HTMLCOUNT " border-color:white;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
863 print HTMLCOUNT " border-width:0px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
864 print HTMLCOUNT " font-family:consolas;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
865 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
866
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
867 print HTMLCOUNT ".tab2 {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
868 print HTMLCOUNT " margin:auto;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
869 print HTMLCOUNT " border-collapse: collapse;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
870 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
871 print HTMLCOUNT " border-width:3px; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
872 print HTMLCOUNT " border-color:white;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
873 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
874
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
875 print HTMLCOUNT ".tab {\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
876 print HTMLCOUNT " margin:auto;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
877 print HTMLCOUNT " border-collapse: collapse;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
878 print HTMLCOUNT " border-width:3px;\n ";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
879 print HTMLCOUNT " border-style:solid;\n ";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
880 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
881 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
882
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
883 print HTMLCOUNT ".td1 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
884 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
885 print HTMLCOUNT " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
886 print HTMLCOUNT " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
887 print HTMLCOUNT " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
888 print HTMLCOUNT " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
889 print HTMLCOUNT " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
890 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
891 print HTMLCOUNT " background-color : #c6c3bd; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
892 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
893
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
894 print HTMLCOUNT ".td2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
895 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
896 print HTMLCOUNT " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
897 print HTMLCOUNT " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
898 print HTMLCOUNT " border-width:1px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
899 print HTMLCOUNT " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
900 print HTMLCOUNT " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
901 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
902 print HTMLCOUNT " background-color : #c6c3ee; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
903 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
904
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
905 print HTMLCOUNT ".td3 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
906 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
907 print HTMLCOUNT " font-size: 11pt;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
908 print HTMLCOUNT " font-weight: bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
909 print HTMLCOUNT " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
910 print HTMLCOUNT " border-width:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
911 print HTMLCOUNT " border-left:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
912 print HTMLCOUNT " border-right:3px;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
913 print HTMLCOUNT " border-style:solid; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
914 print HTMLCOUNT " background-color : white; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
915 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
916
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
917
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
918 print HTMLCOUNT ".ted { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
919 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
920 print HTMLCOUNT " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
921 print HTMLCOUNT " background-color : #A19EED; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
922 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
923
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
924 print HTMLCOUNT ".ted2 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
925 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
926 print HTMLCOUNT " font-weight : bold;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
927 print HTMLCOUNT " background-color : #9A9D7C; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
928 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
929
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
930 print HTMLCOUNT ".ted3 { \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
931 print HTMLCOUNT " border-color:black;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
932 print HTMLCOUNT " font-family: calibri;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
933 print HTMLCOUNT " color: white;\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
934 print HTMLCOUNT " background-color : #333333; \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
935 print HTMLCOUNT " }\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
936
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
937 print HTMLCOUNT ".auto-style1 {";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
938 print HTMLCOUNT " font-weight: normal;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
939 print HTMLCOUNT " font-size: x-small;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
940 print HTMLCOUNT "}";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
941
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
942 print HTMLCOUNT "</style>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
943
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
944 ###################################################################################################################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
945
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
946 print HTMLSNP "</head>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
947
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
948 print HTMLSNP "<center><img src=\"".$REPimages."SNiPloid7.png\" WIDTH=250></center>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
949 if ($poly_poly_analysis == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
950 print HTMLSNP "<center><img src=\"".$REPimages."arbre.png\" WIDTH=400></center>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
951 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
952 print HTMLSNP "<p>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
953 #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
954 print HTMLCOUNT "</head>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
955 print HTMLCOUNT "<table><tr><td class=\"tab2\"><img src=\"".$REPimages."SNiPloid7.png\" WIDTH=250>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
956
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
957 print HTMLCOUNT "<h3><font face=\"calibri\">Synthesis of the analysis</font></h3></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
958 if ($poly_poly_analysis == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
959
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
960 print HTMLCOUNT "<td class=\"tab2\" width=50></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
961 print HTMLCOUNT "<td class=\"tab2\"><table border=\"1\" border cellpadding=\"5\" style=\"text-align:center;\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
962 print HTMLCOUNT "<tr><th>Diploids</th><th>Polyploid</th><th>Identity</th><th>Interpretation</th></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
963 print HTMLCOUNT "<tr><td>[1/2]</td><td>[1]</td><td>!=</td><td><img src=\"".$REPimages."1.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
964 print HTMLCOUNT "<tr><td>[1/2]</td><td>[2]</td><td>!=</td><td><img src=\"".$REPimages."2.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
965 print HTMLCOUNT "<tr><td>[1]</td><td>[1/2]</td><td>!=</td><td><img src=\"".$REPimages."3.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
966 print HTMLCOUNT "<tr><td>[2]</td><td>[1/2]</td><td>!=</td><td><img src=\"".$REPimages."4.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
967 print HTMLCOUNT "<tr><td>[1/2]</td><td>[1/2]</td><td>=</td><td><img src=\"".$REPimages."5v.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
968 print HTMLCOUNT "<tr><td>[1]</td><td>[2]</td><td>!=</td><td><img src=\"".$REPimages."other.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
969 print HTMLCOUNT "<tr><td>[1]</td><td>[2/3]</td><td>!=</td><td><img src=\"".$REPimages."other.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
970 print HTMLCOUNT "<tr><td>[1/2]</td><td>[2/3]</td><td>!=</td><td><img src=\"".$REPimages."other.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
971 print HTMLCOUNT "<tr><td>[1/2]</td><td>[1/2]</td><td>!=</td><td><img src=\"".$REPimages."other.png\" height=30><img src=\"".$REPimages."HG1.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
972 print HTMLCOUNT "<tr><td>[1]</td><td>[1/2]</td><td>!=</td><td><img src=\"".$REPimages."other.png\" height=30><img src=\"".$REPimages."HG1.png\" height=30></td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
973 print HTMLCOUNT "</table></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
974 print HTMLCOUNT "<td class=\"tab2\" width=50></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
975 print HTMLCOUNT "<td class=\"tab2\"><center><img src=\"".$REPimages."arbre.png\" WIDTH=400></center></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
976 #print HTMLCOUNT "<td><table border=\"1\" border cellpadding=\"5\" style=\"text-align:center;\"><tr><th>Diploids</th><th>Polyploid</th><th>Identity</th><th>Interpretation</th></tr></table></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
977 print HTMLCOUNT "</tr></table>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
978 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
979 print HTMLCOUNT "<p>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
980 #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
981
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
982 print HTMLSNP "<body>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
983
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
984 if ($poly_poly_analysis == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
985 print HTMLSNP "<center><h3><font face=\"calibri\">Result of SNP comparison of two Polyploids</font></h3></center>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
986 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
987 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
988 print HTMLSNP "<center><h3><font face=\"calibri\">Result of SNP comparison of a Polyploid and its Parental Genomes (Genome 1 and Genome 2 as reference)</font></h3></center>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
989 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
990
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
991 print HTMLSNP "<p>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
992
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
993 # COLUMNS - HTMLSNP SNP VIEW
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
994 print HTMLSNP "<table border=\"1\" border cellpadding=\"5\" style=\"text-align:center;\"> \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
995 print HTMLSNP "<tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
996 print HTMLSNP "<th>Gene</th>"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
997 print HTMLSNP "<th>Position</th>"; # (2) Position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
998
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
999 if ($poly_poly_analysis == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1000 print HTMLSNP "<th>REF<br></th>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1001 print HTMLSNP "<th>Polyploid 1<br><span class=\"auto-style1\">".$polyploidName."</span></th>"; # (3) Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1002 print HTMLSNP "<th>Polyploid 2<br><span class=\"auto-style1\">".$polyploid2Name."</span></th>"; # (4) Polyploid 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1003
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1004 print HTMLSNP "<th>[Filtered/Total] Depth<br>Polyploid 1<br><span class=\"auto-style1\">".$polyploidName."</span></th>"; # (8) Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1005 print HTMLSNP "<th>[Filtered/Total] Depth<br>Polyploid 2<br><span class=\"auto-style1\">".$polyploid2Name."</span></th>"; # (9) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1006
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1007 # Entête fichier SNP VIEW TAB
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1008 print TABSNP "Gene\t"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1009 print TABSNP "Position\t"; # (2) Position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1010 print TABSNP "REF\t"; # (2) Position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1011 print TABSNP "Polyploid 1: ".$polyploidName."\t"; # (3) Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1012 print TABSNP "Polyploid 2: ".$genome1Name."\t"; # (4) Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1013 print TABSNP "P1 Filtered Depth\t"; # (9) Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1014 print TABSNP "P1 Total Depth\t"; # (10) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1015 print TABSNP "P2 Filtered Depth\t"; # (9) Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1016 print TABSNP "P2 Total Depth\n"; # (10) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1017 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1018 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1019 # (3) Reference
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1020 print HTMLSNP "<th>Polyploid<br><span class=\"auto-style1\">".$polyploidName."</span></th>"; # (3) Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1021 print HTMLSNP "<th>Genome 1<br><span class=\"auto-style1\">".$genome1Name."</span></th>"; # (4) Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1022 print HTMLSNP "<th>Genome 2<br><span class=\"auto-style1\">".$genome2Name."</span></th>"; # (5) Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1023 print HTMLSNP "<th>Validation</th>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1024 print HTMLSNP "<th>Ratio (%)<br><span class=\"auto-style1\">".$genome2Name." : ".$genome1Name."</span></th>"; # (7) Ratio
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1025 print HTMLSNP "<th>Filtered<br>Depth</th>"; # (8) Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1026 print HTMLSNP "<th>Total<br>Depth</th>"; # (9) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1027 print HTMLSNP "<th>SNP Class</th>"; # (9) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1028
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1029 # Entête fichier SNP VIEW TAB
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1030 print TABSNP "Gene\t"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1031 print TABSNP "Position\t"; # (2) Position
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1032 print TABSNP "Polyploid: ".$polyploidName."\t"; # (3) Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1033 print TABSNP "Genome 1: ".$genome1Name."\t"; # (4) Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1034 print TABSNP "Genome 2: ".$genome2Name."\t"; # (5) Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1035 print TABSNP "Validation\t"; # (6) Validation
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1036 print TABSNP "Ratio (%) ".$genome2Name."\t"; # (7) Ratio Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1037 print TABSNP "Ratio (%) ".$genome1Name."\t"; # (8) Ratio Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1038 print TABSNP "Filtered Depth\t"; # (9) Filtered Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1039 print TABSNP "Total Depth\t"; # (10) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1040 print TABSNP "SNP Class\n"; # (10) Total Depth
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1041 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1042 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1043
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1044
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1045
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1046 #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1047 print HTMLCOUNT "<body>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1048 print HTMLCOUNT "<p>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1049 # COLUMNS - HTML SYNTHESIS
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1050 print HTMLCOUNT "<table border=\"1\" border cellpadding=\"5\" style=\"text-align:center;\"> \n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1051 print HTMLCOUNT "<tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1052 print HTMLCOUNT "<th>Gene</th>"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1053 print HTMLCOUNT "<th>Interval Size<br>Analysed (pb)</th>"; # (2) Interval Size Analyzed
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1054 print HTMLCOUNT "<th>nb Positions<br>with SNP</th>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1055 if ($poly_poly_analysis == 0) { # (3) nB Positions With SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1056 print HTMLCOUNT "<th><img src=\"".$REPimages."1.png\" height=30></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1057 print HTMLCOUNT "<th><img src=\"".$REPimages."2.png\" height=30></th>"; # (5) [2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1058 print HTMLCOUNT "<th><img src=\"".$REPimages."3ou4.png\" height=30></th>"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1059 print HTMLCOUNT "<th><img src=\"".$REPimages."3.png\" height=30></th>"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1060 print HTMLCOUNT "<th><img src=\"".$REPimages."4.png\" height=30></th>"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1061 print HTMLCOUNT "<th><img src=\"".$REPimages."5v.png\" height=30></th>"; # (11) [5]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1062 print HTMLCOUNT "<th><img src=\"".$REPimages."other.png\" height=30></th>"; # (7) [other]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1063 print HTMLCOUNT "<th><img src=\"".$REPimages."HG1.png\" height=30><br><span class=\"auto-style1\">".$genome1Name."</span></th>"; # (8) Heterozygosity For Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1064 print HTMLCOUNT "<th>SNP Intra-Diploids <br><img src=\"".$REPimages."5v.png\" height=30> + <img src=\"".$REPimages."1.png\" height=30> + <img src=\"".$REPimages."2.png\" height=30> + <img src=\"".$REPimages."other.png\" height=30></th>"; # (9) SNP Diploids
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1065 print HTMLCOUNT "<th>SNP Intra-Polyploid <br> <img src=\"".$REPimages."5v.png\" height=30> + <img src=\"".$REPimages."3ou4.png\" height=30> + <img src=\"".$REPimages."other.png\" height=30></th>"; # (10) SNP Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1066 print HTMLCOUNT "<th>Ratio (%)<br><span class=\"auto-style1\">".$genome2Name." : ".$genome1Name."</span></th>\n\n\n\n\n\n\n\n"; # (12) Ratio %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1067
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1068 print HTMLCOUNT "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1069 # Entête HTMLSNP Synthesis
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1070 print TABCOUNT "Gene\t"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1071 print TABCOUNT "Interval Size Analysed (pb)\t"; # (2) Interval Size Analysed (pb)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1072 print TABCOUNT "nb SNP positions\t"; # (3) nb SNP positions
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1073 print TABCOUNT "1\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1074 print TABCOUNT "2\t"; # (5) [2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1075 print TABCOUNT "3 or 4\t"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1076 print TABCOUNT "3\t"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1077 print TABCOUNT "4\t"; # (6) [3 or 4]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1078 print TABCOUNT "5\t"; # (11) [5]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1079 print TABCOUNT "other\t"; # (7) [other]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1080 print TABCOUNT "SNP Heterozygosity Genome 1\t"; # (8) SNP Heterozygosity Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1081 print TABCOUNT "SNP Diploids\t"; # (9) SNP Diploids
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1082 print TABCOUNT "SNP Polyploid\t"; # (10) SNP Polyploid
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1083 print TABCOUNT "Ratio (%) ".$genome2Name."\t"; # (12) Ratio (%) Genome 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1084 print TABCOUNT "Ratio (%) ".$genome1Name."\n"; # (13) Ratio (%) Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1085 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1086 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1087 print HTMLCOUNT "<th>P1 = P2<br><span style=\"font-weight: normal\"><span style=\"background:#DE8A8A\">[1/2]</span> vs <span style=\"background:#DE8A8A\">[1/2]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1088 print HTMLCOUNT "<th>P1 = P2<br><span style=\"font-weight: normal\"><span style=\"background:#5CAAD2\">[1]</span> vs <span style=\"background:#5CAAD2\">[1]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1089 print HTMLCOUNT "<th>SNP<br>interpolyploids<br>P1 &ne; P2<br><span style=\"auto-style1\"></span></th>"; # (4) [1] #DE8A8A
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1090 print HTMLCOUNT "<th>P1 &ne; P2<br>2 Alleles<br><span style=\"font-weight: normal\"><span style=\"background:#5CAAD2\">[1]</span> vs <span style=\"background:#5CAAD2\">[2]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1091 print HTMLCOUNT "<th>P1 &ne; P2<br>2 Alleles<br><span style=\"font-weight: normal\"><span style=\"background:#DE8A8A\">[1/2]</span> vs <span style=\"background:#5CAAD2\">[1]</span> or <span style=\"background:#5CAAD2\">[2]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1092 print HTMLCOUNT "<th>P1 &ne; P2<br>3 Alleles<br><span style=\"font-weight: normal\"><span style=\"background:#DE8A8A\">[1/2]</span> vs <span style=\"background:#5CAAD2\">[3]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1093 print HTMLCOUNT "<th>P1 &ne; P2<br>3 Alleles<br><span style=\"font-weight: normal\"><span style=\"background:#DE8A8A\">[1/2]</span> vs <span style=\"background:#DE8A8A\">[1/3]</span></span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1094 print HTMLCOUNT "<th>SNP<br>intra P1<br><span class=\"auto-style1\">".$polyploidName."</span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1095 print HTMLCOUNT "<th>SNP<br>intra P2<br><span class=\"auto-style1\">".$polyploid2Name."</span></th>"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1096
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1097 print HTMLCOUNT "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1098 # Entête HTMLSNP Synthesis
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1099 print TABCOUNT "Gene\t"; # (1) Gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1100 print TABCOUNT "Interval Size Analysed (pb)\t"; # (2) Interval Size Analysed (pb)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1101 print TABCOUNT "nb positions with SNP\t"; # (3) nb SNP positions
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1102 print TABCOUNT "P1 = P2 [1/2] vs [1/2]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1103 print TABCOUNT "P1 = P2 [1] vs [1]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1104 print TABCOUNT "SNP interpolyploids P1 diff P2\t"; # (4) [1] #DE8A8A
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1105 print TABCOUNT "P1 diff P2 2 Alleles [1] vs [2]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1106 print TABCOUNT "P1 diff P2 2 Alleles [1/2] vs [1] or [2]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1107 print TABCOUNT "P1 diff P2 3 Alleles [1/2] vs [3]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1108 print TABCOUNT "P1 diff P2 3 Alleles [1/2] vs [1/3]\t"; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1109 print TABCOUNT "SNP intra P1 ".$polyploidName."\t" ; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1110 print TABCOUNT "SNP intra P2 ".$polyploid2Name."\n" ; # (4) [1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1111
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1112 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1113 #----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1114 $ligneInter = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1115 $totalSNP = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1116 $totalSize = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1117
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1118 $total11 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1119 $total22 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1120 $total3ou4 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1121 $total5 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1122 $total512 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1123 $total534 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1124 $totalOther = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1125 $totalGenome2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1126
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1127 $total3 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1128 $total4 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1129
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1130 $totalNbPolyploid1 = 0 ; # SNP heterozygosity for P1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1131 $totalNbPolyploid2 = 0 ; # SNP heterozygosity for P2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1132 $totalNbCommuns = 0 ; # SNP heterozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1133 $totalNbCommunsHomo = 0 ; # SNP homozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1134 $totalNbDifferent = 0 ; # [P1] ne [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1135 $totalNbHomoDiff = 0 ; # Example : P1 = [A] ; P2 = [G]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1136 $totalNbAlleleCommun = 0 ; # Example : P1 = [A/G] ; P2 = [A]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1137 $totalAlleleDifferent = 0 ; # Example : P1 = [A/G] ; P2 = [C] or [T]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1138 $totalAlleleCommunH = 0 ; # Example : P1 = [A/G] ; P2 = [A/C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1139
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1140 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1141
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1142 sub int_output { # intern reference
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1143
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1144 foreach my $s(sort(keys(%snp_final))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1145 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1146 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1147 print HTMLSNP "<tr class=\"bord1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1148 print HTMLCOUNT "<tr class=\"td1\ border-width =\"3px\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1149 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1150 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1151 print HTMLSNP "<tr class=\"bord2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1152 print HTMLCOUNT "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1153 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1154 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1155
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1156 my $ref = $snp_final{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1157 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1158 $taille = keys(%hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1159
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1160 # taille de la ligne gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1161 print HTMLSNP "<td rowspan=\"".$taille."\"><b>".$s."</b></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1162
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1163 $ligneOK = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1164
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1165 $nbPolyploid = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1166 $nbGenomes = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1167 $nbGenome2 = 0 ; # SNP chez les diploides dans un cas "Other" avec genome 1 heterozygote
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1168 $nbCommuns = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1169 $nbPoly_only = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1170 $nbSub_only = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1171
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1172 $case5 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1173 $case1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1174 $case2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1175 $case3ou4 = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1176 $case3 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1177 $case4 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1178 $caseOther = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1179 $casePolyplother = 0 ; # SNP chez le polyploide dans un cas "Other"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1180 $caseDiplother = 0 ; # SNP chez les diploides dans un cas "Other"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1181
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1182
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1183
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1184 # Moyenne Ponderee
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1185 $moyenneSNPindep1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1186 $moyenneSNPindep2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1187
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1188 @tabTrie = sort ({ $a <=> $b }keys %hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1189
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1190 #foreach my $c(sort ({$hash{$a} <=> $hash{$b}} keys %hash)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1191 foreach my $c(@tabTrie) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1192 if ($ligneOK == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1193 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1194 print HTMLSNP "<tr class=\"td1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1195 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1196 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1197 print HTMLSNP "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1198 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1199 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1200 ################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1201 ### Recuperation des informations ###
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1202
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1203 ($code_snp,$ratio,$GT_poly,$DP_P,$code_G1,$GT_G1) = split(/\t/,$snp_final{$s}{$c});
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1204 ($DP_P, $FDP) = split(/-/, $DP_P);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1205 #print STDOUT "\n($code_snp:$GT_poly) - ($code_G1:$GT_G1)" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1206 if ($GT_poly ne "") { # Polyploide = [0.0] ou [0.1] ou [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1207 @recupAlleles = split(/\[/,$code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1208 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1209 ($alRef,$alAltP) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1210 # Attribution des alleles au polyploide si pas de SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1211 if ($GT_poly =~ /^0.0$/) { $code_snp = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1212 if ($GT_poly =~ /^1.1$/) { $code_snp = $alAltP ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1213 # Attribution des alleles au genome 1 si pas de SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1214 if (($GT_G1 eq "") || ($GT_G1 =~ /^0.0$/)) { $code_G1 = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1215 if ($GT_G1 =~ /^1.1$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1216 @recupAlleles = split(/\[/,$code_G1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1217 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1218 ($alRef,$alAlt) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1219 $code_G1 = $alAlt;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1220 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1221 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1222 elsif ($GT_G1 ne "") { # pas de SNP polyploide dans le fichier 1 (fichiers non mergés) -> equivalent de [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1223 @recupAlleles = split(/\[/,$code_G1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1224 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1225 ($alRef,$alAlt) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1226 # Attribution des Alleles au genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1227 if ($GT_G1 =~ /^1.1$/) { $code_G1 = $alAlt ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1228 if ($GT_G1 =~ /^0.0$/) { $code_G1 = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1229 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1230
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1231 ################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1232 $noSNPpoly = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1233
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1234
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1235
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1236
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1237 if ((($GT_poly =~ /^0.1$/)||($GT_poly =~ /^1.0$/)) && (($GT_G1 =~ /^1.1$/)) && ($code_G1 eq $alAltP)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1238 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1239 print HTMLSNP "<td class=\"tedG2\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1240 print HTMLSNP "<td class=\"ted2\">".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1241 print HTMLSNP "<td class=\"ted2\">".$code_G1."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1242 print HTMLSNP "<td class=\"ted2\">".$alRef."</td>"; #REF
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1243 print HTMLSNP "<td class=\"ted2\">OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1244
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1245 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1246 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1247 print HTMLSNP "<td class=\"tedG\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1248 print HTMLSNP "<td class=\"ted\">".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1249 print HTMLSNP "<td class=\"ted\">".$code_G1."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1250 print HTMLSNP "<td class=\"ted\">".$alRef."</td>"; #REF
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1251 print HTMLSNP "<td class=\"ted\">OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1252 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1253 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1254 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1255 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1256 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1257 print HTMLSNP "<td>".$code_G1."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1258 print HTMLSNP "<td>".$alRef."</td>"; #REF
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1259 print HTMLSNP "<td>not OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1260 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1261 print TABSNP $s."\t".$c."\t".$code_snp."\t".$code_G1."\t".$alRef."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1262
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1263
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1264
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1265 $tailleImg = 35 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1266
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1267
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1268 if (($GT_poly =~ /^0.1$/)||($GT_poly =~ /^1.0$/)) { # SNP POLYPLOID - [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1269 # Moyenne du Ratio -----------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1270 ($sub1,$sub2) = split(",",$ratio);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1271 $somme = $sub1 + $sub2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1272
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1273 if ($somme == 0 ) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1274 print STDOUT "ERROR : Cannot calculate ratio for ".$gene." [pos:".$position."]\n\"".$line."\"";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1275 die ("ERROR : Cannot calculate ratio for ".$gene." [pos:".$position."]\n\"".$line."\"");
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1276 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1277 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1278 $ratio = ($sub1/($sub1+$sub2))*100;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1279 $ratio = sprintf("%.0f", $ratio);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1280 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1281 #$ratio = sprintf("%.0f", $ratio);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1282 $ratio2 = 100-$ratio ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1283
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1284 #-----------------------------------------------------
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1285 if (($GT_G1 =~ /^1.1$/)){ # Pas de SNP Genome1 [1/1] [1|1] SNP entre genome1 et genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1286 if ($code_G1 eq $alAltP) { # 5
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1287 $moyenneSNPindep1 = $moyenneSNPindep1 + $ratio ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1288 $moyenneSNPindep2 = $moyenneSNPindep2 + $ratio2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1289 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1290 print HTMLSNP "<td class=\"ted2\">".$ratio.":".$ratio2."<br>"; # RATIO %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1291 print HTMLSNP "<img src=\"".$REPimages."r1.png\" height=10 width=".$ratio.">"; # IMG RATIO 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1292 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=10 width=".$ratio2."></td>"; # IMG RATIO 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1293 print HTMLSNP "<td class=\"ted2\">".$FDP."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1294 print HTMLSNP "<td class=\"ted2\">".$DP_P."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1295 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1296
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1297 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1298 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1299 print HTMLSNP "<td class=\"ted\">".$ratio.":".$ratio2."<br>"; # RATIO %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1300 print HTMLSNP "<img src=\"".$REPimages."r1.png\" height=10 width=".$ratio.">"; # IMG RATIO 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1301 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=10 width=".$ratio2.">"; # IMG RATIO 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1302 print HTMLSNP "<td class=\"ted\">".$FDP."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1303 print HTMLSNP "<td class=\"ted\">".$DP_P."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1304 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1305
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1306 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1307 print TABSNP "OK\t".$ratio."\t".$ratio2."\t".$FDP."\t".$DP_P."\t5";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1308 $case5 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1309 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1310 else { # Other 0.1 - 1.1 (O GA A) # Other [SNP DIPLO + SNP POLY]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1311 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1312 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1313 print TABSNP "not OK\t#\t#\t#\t#\tother";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1314 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1315 $casePolyplother ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1316 $caseDiplother ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1317 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1318 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1319 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1320 if (($GT_G1 =~ /^0.0$/)||($GT_G1 =~ /^$/)){ # 3 ou 4
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1321
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1322 ###############################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1323 # PHASING
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1324 ###############################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1325 $phasedornot = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1326 my $is_3 = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1327 my $is_4 = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1328 if ($GT_poly =~/\|/){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1329
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1330 #print STDOUT $s."\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1331 my $ref = $phased_regions{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1332 my %hash = %$ref ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1333 foreach my $num_reg(sort(keys(%hash))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1334 if (exists $phased_regions{$s}{$num_reg}{$c}) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1335 $genotype = $phased_regions{$s}{$num_reg}{$c} ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1336 my $ref2 = $phased_regions{$s}{$num_reg};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1337 my %hash2 = %$ref2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1338 foreach my $pos(sort(keys(%hash2))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1339 if (exists $five{$s}{$pos}){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1340 if (($five{$s}{$pos} =~ /0.1/ && $GT_poly =~ /0.1/) or ($five{$s}{$pos} =~ /1.0/ && $GT_poly =~ /1.0/)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1341 print HTMLSNP "<td class=\"ted2\">".$ratio.":".$ratio2."<br>"; # RATIO %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1342 print HTMLSNP "<img src=\"".$REPimages."r1.png\" height=10 width=".$ratio.">"; # IMG RATIO 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1343 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=10 width=".$ratio2."></td>"; # IMG RATIO 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1344 print HTMLSNP "<td class=\"ted2\">".$FDP."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1345 print HTMLSNP "<td class=\"ted2\">".$DP_P."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1346 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."3.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1347 $case3 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1348 $is_3 = 1;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1349 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1350 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1351 print HTMLSNP "<td class=\"ted2\">".$ratio.":".$ratio2."<br>"; # RATIO %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1352 print HTMLSNP "<img src=\"".$REPimages."r1.png\" height=10 width=".$ratio.">"; # IMG RATIO 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1353 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=10 width=".$ratio2."></td>"; # IMG RATIO 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1354 print HTMLSNP "<td class=\"ted2\">".$FDP."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1355 print HTMLSNP "<td class=\"ted2\">".$DP_P."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1356
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1357 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."4.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1358 $case4 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1359 $is_4 = 1;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1360 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1361 $phasedornot = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1362 last ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1363 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1364 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1365 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1366 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1367 #print STDOUT "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1368 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1369 if ($phasedornot == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1370 print HTMLSNP "<td class=\"ted2\">".$ratio.":".$ratio2."<br>"; # RATIO %
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1371 print HTMLSNP "<img src=\"".$REPimages."r1.png\" height=10 width=".$ratio.">"; # IMG RATIO 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1372 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=10 width=".$ratio2."></td>"; # IMG RATIO 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1373 print HTMLSNP "<td class=\"ted2\">".$FDP."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1374 print HTMLSNP "<td class=\"ted2\">".$DP_P."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1375 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."3ou4.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1376 $case3ou4 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1377 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1378
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1379 ###############################################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1380
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1381
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1382
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1383 print TABSNP "not OK\t".$ratio."\t".$ratio2."\t".$FDP."\t".$DP_P."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1384 if ($is_3){print TABSNP "3";}
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1385 elsif ($is_4){print TABSNP "4";}
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1386 else{print TABSNP "3or4";}
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1387
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1388 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1389 else { #0/1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1390 # heterozygosity G1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1391 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1392 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."><img src=\"".$REPimages."HG1.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1393 print TABSNP "not OK\t#\t#\t#\t#\tother,heterozygosity for genome 1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1394 $nbGenome2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1395 $casePolyplother ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1396 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1397 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1398 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1399 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1400
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1401 if (($GT_poly =~ /^1.1$/)) { # POLYPLOID NE REFERENCE - [1/1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1402 if ($GT_G1 && ($GT_G1 !~ /^0.0$/) && ($GT_G1 !~ /^1.1$/)){ # SNP Genome1 intra [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1403 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1404 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."><img src=\"".$REPimages."HG1.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1405 print TABSNP "not OK\t#\t#\t#\t#\tother,heterozygosity for genome 1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1406 $nbGenome2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1407 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1408 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1409 elsif (!$GT_G1){ # POLYPLOID A/A DIPLOIDS T/T
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1410 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1411 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1412 print TABSNP "not OK\t#\t#\t#\t#\tother";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1413 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1414 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1415
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1416 else { # Pas de SNP Genome1 [0/0] [0|0] [1/1] [1|1] SNP entre genome1 et genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1417 if ($GT_G1 =~ /^0.0$/){ # Other [NOTHING]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1418 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1419 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1420 print TABSNP "not OK\t#\t#\t#\t#\tother";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1421 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1422 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1423 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1424 if ($code_G1 eq $alAltP) { # 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1425 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1426 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."2.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1427 print TABSNP "not OK\t#\t#\t#\t#\t2";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1428 $case2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1429 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1430 else { # Other [SNP DIPLO]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1431 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1432 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1433 print TABSNP "not OK\t#\t#\t#\t#\tother";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1434 $caseOther ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1435 $caseDiplother ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1436 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1437 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1438 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1439 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1440
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1441 if (($GT_poly =~ /^0.0$/)||($GT_poly =~ /^$/)) { #POLYPLOID == REFERENCE - [0|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1442 ####################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1443 if (($GT_G1 !~ /^0.0$/) && ($GT_G1 !~ /^1.1$/)){ # SNP Genome1 intra [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1444 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1445 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=".$tailleImg."><img src=\"".$REPimages."HG1.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1446 print TABSNP "not OK\t#\t#\t#\t#\tother,heterozygosity for genome 1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1447 $nbGenome2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1448 $caseOther++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1449 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1450 else { # Pas de SNP Genome1 [0/0] [0|0] [1/1] [1|1] SNP entre genome1 et genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1451 if ($GT_G1 =~ /^1.1$/){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1452 print HTMLSNP "<td>#</td><td>#</td><td>#</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1453 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."1.png\" height=".$tailleImg."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1454 print TABSNP "not OK\t#\t#\t#\t#\t1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1455 $case1 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1456 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1457 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1458 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1459
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1460 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1461 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1462 $ligneOK = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1463 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1464
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1465 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1466 print HTMLCOUNT "<td class=\"ted2\" style=\"border-right:3px solid black\">".$s."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1467 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1468 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1469 print HTMLCOUNT "<td class=\"ted\" style=\"border-right:3px solid black\">".$s."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1470 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1471 print TABCOUNT $s."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1472
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1473 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1474 if ($ligneInter == 0) { $ligneInter = 1 ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1475 else { $ligneInter = 0 ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1476 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1477
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1478 # Calcul des intervalles #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1479 ##########################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1480 $taille_totale = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1481 my $ref = $intervalle2{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1482 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1483
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1484 foreach my $interval(keys(%hash)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1485 my @pos = split(/-/,$interval);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1486 $taille_inter = $pos[1]-$pos[0]+1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1487 $taille_totale = $taille_totale + $taille_inter;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1488 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1489 $total1 = $case5 + $case1 + $case2 + $caseDiplother + $nbGenome2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1490 $total2 = $case5 + $case3ou4 + $casePolyplother;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1491
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1492
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1493
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1494 # SYNTHESIS
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1495 print HTMLCOUNT "<td>".$taille_totale."</td><td style=\"border-left:3px solid black\">".$taille."</td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1496 print HTMLCOUNT "<td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1497 print HTMLCOUNT $case1."</td><td>".$case2."</td><td>".$case3ou4."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1498 print HTMLCOUNT $case3."</td><td>".$case4."</td><td>".$case5."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1499 print HTMLCOUNT $caseOther."</td><td style=\"border-left:3px solid black\">".$nbGenome2."</td><td style=\"border-left:3px solid black\">".$total1."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1500 print HTMLCOUNT "<td style=\"border-left:3px solid black\">".$total2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1501 print TABCOUNT $taille_totale."\t".$taille."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1502 print TABCOUNT $case1."\t".$case2."\t".$case3ou4."\t".$case3."\t".$case4."\t".$case5."\t".$caseOther."\t".$nbGenome2."\t".$total1."\t".$total2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1503
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1504 $nbTotGenesAna ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1505
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1506 if ($case5 != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1507 $nbTotGenesVal ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1508 if ($ligneInter == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1509 print HTMLCOUNT "<td class=\"ted2\" style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1510 print HTMLCOUNT sprintf("%.0f", $moyenneSNPindep1/$case5).":".sprintf("%.0f", $moyenneSNPindep2/$case5)."<br>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1511 print HTMLCOUNT "<img src=\"".$REPimages."r1.png\" height=10 width=".sprintf("%.0f", $moyenneSNPindep1/$case5).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1512 print HTMLCOUNT "<img src=\"".$REPimages."r2.png\" height=10 width=".sprintf("%.0f", $moyenneSNPindep2/$case5)."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1513 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1514 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1515 print HTMLCOUNT "<td class=\"ted\" style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1516 print HTMLCOUNT sprintf("%.0f", $moyenneSNPindep1/$case5).":".sprintf("%.0f", $moyenneSNPindep2/$case5)."<br>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1517 print HTMLCOUNT "<img src=\"".$REPimages."r1.png\" height=10 width=".sprintf("%.0f", $moyenneSNPindep1/$case5).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1518 print HTMLCOUNT "<img src=\"".$REPimages."r2.png\" height=10 width=".sprintf("%.0f", $moyenneSNPindep2/$case5)."></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1519 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1520 print TABCOUNT sprintf("%.0f", $moyenneSNPindep1/$case5)."\t".sprintf("%.0f", $moyenneSNPindep2/$case5)."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1521 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1522 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1523 print HTMLCOUNT "<td style=\"border-left:3px solid black\"></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1524 print TABCOUNT "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1525 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1526 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1527 print TABCOUNT "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1528
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1529 $totalSize = $totalSize + $taille_totale ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1530 $totalSNP = $totalSNP + $taille ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1531 $total11 = $total11 + $case1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1532 $total22 = $total22 + $case2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1533 $total3ou4 = $total3ou4 + $case3ou4 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1534 $total3 = $total3 + $case3 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1535 $total4 = $total4 + $case4 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1536 $total5 = $total5 + $case5 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1537 $total512 = $total512 + $total1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1538 $total534 = $total534 + $total2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1539 $totalOther = $totalOther + $caseOther ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1540 $totalGenome2 = $totalGenome2 + $nbGenome2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1541 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1542 ########## MODIF DERNIERE MINUTE ################"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1543 print HTMLCOUNT "<tr class=\"td3\">\n<td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1544
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1545 print HTMLCOUNT $nbTotGenesAna."<td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1546 print HTMLCOUNT $totalSize."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1547 print HTMLCOUNT $totalSNP."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1548 print HTMLCOUNT $total11."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1549 print HTMLCOUNT $total22."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1550 print HTMLCOUNT $total3ou4."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1551 print HTMLCOUNT $total3."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1552 print HTMLCOUNT $total4."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1553 print HTMLCOUNT $total5."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1554 print HTMLCOUNT $totalOther."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1555 print HTMLCOUNT $totalGenome2."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1556 print HTMLCOUNT $total512."</td><td style=\"border:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1557 print HTMLCOUNT $total534."</td><td style=\"border:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1558
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1559 print HTMLCOUNT $nbTotGenesVal."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1560
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1561 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1562
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1563
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1564 print TABCOUNT "$nbTotGenesAna\t$totalSize\t$totalSNP\t$total11\t$total22\t$total3ou4\t$total3\t$total4\t$total5\t$totalOther\t$totalGenome2\t$total512\t$total534\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1565 print TABCOUNT "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1566
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1567 ####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1568 print HTMLSNP "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1569 print HTMLSNP "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1570 close HTMLSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1571
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1572 print HTMLCOUNT "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1573 print HTMLCOUNT "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1574 close HTMLCOUNT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1575
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1576 close TABSNP;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1577 close TABCOUNT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1578
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1579 tie @array, 'Tie::File', $SNP_count or die ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1580
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1581 $array[113] = "<tr><td class=\"ted3\">".$nbTotGenesAna."</td><td class=\"ted3\" style=\"border-left:3px solid black\">".$totalSize."</td><td class=\"ted3\" style=\"border-left:3px solid black\">".$totalSNP."</td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1582 $array[114] = "<td class=\"ted3\" style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1583 $array[115] = $total11."</td><td class=\"ted3\">".$total22."</td><td class=\"ted3\">".$total3ou4."</td><td class=\"ted3\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1584 $array[116] = $total3."</td><td class=\"ted3\">".$total4."</td><td class=\"ted3\">".$total5."</td><td class=\"ted3\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1585 $array[117] = $totalOther."</td><td class=\"ted3\" style=\"border-left:3px solid black\">".$totalGenome2."</td><td class=\"ted3\" style=\"border-left:3px solid black\">".$total512."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1586 $array[118] = "<td class=\"ted3\" style=\"border-left:3px solid black\">".$total534."</td><td class=\"ted3\">".$nbTotGenesVal."</td></tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1587 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1588
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1589
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1590
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1591
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1592 sub ext_output { # Extern reference
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1593
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1594 print TABCOUNT "Gene;Interval Size Analysed (pb);nb SNP;1;2;3 or 4;5;other;SNP Diploids;SNP Polyploid;Ratio (%) $genome2Name:$genome1Name\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1595
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1596 foreach my $s(sort(keys(%snp))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1597
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1598 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1599 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1600 print HTMLSNP "<tr class=\"bord1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1601 print HTMLCOUNT "<tr class=\"td1\ border-width =\"3px\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1602 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1603 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1604 print HTMLSNP "<tr class=\"bord2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1605 print HTMLCOUNT "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1606 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1607 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1608
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1609
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1610 my $ref = $snp{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1611 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1612 $taille = keys(%hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1613 # taille de la ligne gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1614 print HTMLSNP "<td rowspan=\"$taille\"><b>$s</b></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1615
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1616 $ligneOK = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1617
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1618 $nbPolyploid = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1619 $nbGenomes = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1620 $nbCommuns = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1621 $nbPoly_only = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1622 $nbSub_only = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1623
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1624 $case5 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1625 $case1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1626 $case2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1627 $case3ou4 = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1628 $caseOther = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1629 $caseGenome2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1630
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1631 #Moyenne Ponderee
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1632 $moyenneSNPindep1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1633 $moyenneSNPindep2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1634
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1635 @tabTrie = sort ({ $a <=> $b }keys %hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1636
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1637 #foreach my $c(sort ({$hash{$a} <=> $hash{$b}} keys %hash)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1638 foreach my $c(@tabTrie) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1639 $nb1 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1640 $nb2 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1641 $nb3 = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1642 if ($ligneOK == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1643 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1644 print HTMLSNP "<tr class=\"td1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1645 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1646 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1647 print HTMLSNP "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1648 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1649 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1650 ### Recuperation des informations ###
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1651 ($code_snp,$ratio,$GT_poly,$GT_G1,$GT_G2,$DP_P) = split(/\t/,$snp{$s}{$c});
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1652 @recupAlleles = split(/\[/,$code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1653 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1654 ($alRef,$alAlt) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1655 $noSNPpoly = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1656
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1657 #print STDOUT "\n $c $GT_poly $GT_G1 $GT_G2";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1658 print HTMLSNP "<td>$c</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1659 print TABSNP "$c;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1660 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1661 # SNP POLYPLOID - [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1662 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1663 if (($GT_poly =~ /^0.1$/) || ($GT_poly =~ /^1.0$/) ) { # Polyploid [0.1] [1.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1664 $ratio = sprintf("%.0f", $ratio);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1665 $ratio2 = 100-$ratio ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1666 $moyenneSNPindep1 = $moyenneSNPindep1 + $ratio ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1667 $moyenneSNPindep2 = $moyenneSNPindep2 + $ratio2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1668 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1669 print TABSNP "$code_snp;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1670 if (($GT_G1 =~ /^1.1$/)){ # Genome1 [1/1] [1|1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1671 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1672 print TABSNP "$alAlt;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1673 if($GT_G2 =~ /^1.1$/){ # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1674 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1675 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1676 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1677 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1678 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."3ou4.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1679 print TABSNP "$alAlt;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1680 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1681 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1682 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1683 print TABSNP "3 or 4;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1684 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1685 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1686 if($GT_G2 =~ /^0.0$/){ # Genome2 = Ref [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1687 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1688 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1689 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1690 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1691 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1692 print TABSNP "$alRef";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1693 print TABSNP "OK";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1694 print TABSNP "[$ratio/$ratio2;]";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1695 print TABSNP "$DP_P;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1696 print TABSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1697 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1698 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1699 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1700 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1701 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1702 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1703 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5prime.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1704 print TABSNP "$code_snp;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1705 print TABSNP "OK;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1706 print TABSNP "[$ratio/$ratio2];";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1707 print TABSNP "$DP_P;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1708 print TABSNP "5';";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1709 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1710 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1711 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1712 else{
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1713 if ($GT_G1 =~ /^0.0$/){ # # Genome1 [0/0] [0|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1714 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1715 print TABSNP "$alRef;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1716 if($GT_G2 =~ /^1.1$/){ # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1717 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1718 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1719 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1720 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1721 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1722 print TABSNP "$alAlt;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1723 print TABSNP "OK;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1724 print TABSNP "[$ratio/$ratio2];";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1725 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1726 print TABSNP "5;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1727 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1728 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1729 if($GT_G2 =~ /^0.0$/){ # Genome2 = Ref [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1730 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1731 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1732 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1733 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1734 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."3ou4.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1735 print TABSNP "$alRef;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1736 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1737 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1738 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1739 print TABSNP "3 or 4;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1740 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1741 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1742 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1743 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1744 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1745 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1746 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5prime.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1747 print TABSNP "$code_snp;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1748 print TABSNP "OK;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1749 print TABSNP "[$ratio/$ratio2];";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1750 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1751 print TABSNP "5';";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1752 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1753 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1754 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1755 else { # SNP Genome1 [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1756 print HTMLSNP "<td>$code_snp</td>"; #REF
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1757 print HTMLSNP "$code_snp;"; #REF
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1758 if($GT_G2 =~ /^1.1$/){ # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1759 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1760 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1761 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1762 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1763 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5prime.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1764 print TABSNP "$alAlt;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1765 print TABSNP "OK;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1766 print TABSNP "[$ratio/$ratio2];";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1767 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1768 print TABSNP "5'";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1769 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1770 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1771 if($GT_G2 =~ /^0.0$/){ # Genome2 = Ref [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1772 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1773 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1774 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1775 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1776 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5prime.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1777 print TABSNP "$alRef;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1778 print TABSNP "OK;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1779 print TABSNP "[$ratio/$ratio2];";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1780 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1781 print TABSNP "5';";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1782 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1783 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1784 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1785 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1786 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1787 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1788 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5second.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1789 print TABSNP "$code_snp;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1790 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1791 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1792 print TABSNP ";";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1793 print TABSNP "5''";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1794 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1795 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1796 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1797 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1798 $ligneOK = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1799 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1800 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1801 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1802 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1803 # POLYPLOID NE REFERENCE - [1/1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1804 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1805 #print STDOUT "GTPOLY:$GT_poly@";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1806 if (($GT_poly =~ /^1.1$/) ) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1807 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1808 print TABSNP "$alAlt;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1809 ####################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1810 if (($GT_G1 !~ /^0.0$/) && ($GT_G1 !~ /^1.1$/)){ # Genome 1 [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1811 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1812 print TABSNP "$code_snp";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1813 if ($GT_G2 =~ /^1.1$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1814 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1815 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1816 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1817 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1818 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1819 print TABSNP "$alAlt;;;;5' or 1;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1820 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1821 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1822 if ($GT_G2 =~ /^0.0$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1823 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1824 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1825 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1826 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1827 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1828 print TABSNP "$altRef;;;;5' or 1;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1829 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1830 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1831 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1832 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1833 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1834 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1835 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5second.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1836 print TABSNP "$code_snp;;;;5'';";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1837 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1838 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1839 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1840 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1841 if ($GT_G1 =~ /^0.0$/){ # Genome1 [0/0] [0|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1842 ###################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1843 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1844 print TABSNP "$alRef";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1845 if ($GT_G2 =~ /^1.1$/) { # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1846 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1847 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1848 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1849 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1850 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1851 print TABSNP "$alAlt;;;;1;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1852 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1853 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1854 if ($GT_G2 =~ /^0.0$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1855 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1856 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1857 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1858 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1859 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."3ou4.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1860 print TABSNP "$alAlt;;;;3 or 4;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1861 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1862 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1863 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1864 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1865 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1866 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1867 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1868 print TABSNP "$code_snp;;;;5' or 2";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1869 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1870 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1871 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1872 else { # [1/1] [1|1] Genome 1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1873 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1874 print TABSNP "$alAlt";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1875 if ($GT_G2 =~ /^1.1$/) { # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1876 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1877 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1878 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1879 print HTMLSNP "<td>$DP_P</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1880 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5v.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1881 print TABSNP "$alAlt;OK;[$ratio/$ratio2];$DP_P;5;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1882 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1883 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1884 if ($GT_G2 =~ /^0.0$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1885 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1886 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1887 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1888 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1889 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1890 print TABSNP "$alRef;;;;2;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1891 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1892 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1893 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1894 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1895 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1896 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1897 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1898 print TABSNP "$code_snp;;;;5' or 2" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1899 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1900 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1901 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1902 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1903 $nbPolyploid ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1904 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1905 $ligneOK = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1906 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1907
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1908 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1909 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1910 # POLYPLOID == REFERENCE - [0|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1911 #####################################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1912 if (($GT_poly =~ /^0.0$/) ) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1913 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1914 print TABSNP "$alRef;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1915 if (($GT_G1 !~ /^0.1$/) && ($GT_G1 !~ /^1.0$/)){ # Genome1 intra [0/1] [0|1] [1|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1916 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1917 print TABSNP "$code_snp";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1918 if ($GT_G2 =~ /^1.1$/) { # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1919 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1920 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1921 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1922 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1923 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1924 print TABSNP "$alAlt;;;;5' or 1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1925 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1926 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1927 if ($GT_G2 =~ /^0.0$/) { # Genome2 = Ref [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1928 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1929 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1930 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1931 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1932 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1933 print TABSNP "$alRef;;;;5' or 1";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1934 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1935 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1936 if ( ($GT_G2 =~ /^0.1$/) || ($GT_G2 =~ /^1.0$/)){ # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1937 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1938 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1939 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1940 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1941 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5second.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1942 print TABSNP "$code_snp;;;;5''";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1943 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1944 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1945 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1946 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1947
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1948 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1949 if ($GT_G1 =~ /^0.0$/){ # Pas de SNP Genome1 [0/0] [0|0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1950 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1951 print TABSNP "$alRef";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1952 if ($GT_G2 =~ /^1.1$/) { # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1953 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1954 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1955 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1956 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1957 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1958 print TABSNP "$alAlt;;;;2;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1959 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1960 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1961 if ( ($GT_G2 =~ /^0.1$/) || ($GT_G2 =~ /^1.0$/)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1962 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1963 print HTMLSNP "<td>OK</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1964 print HTMLSNP "<td>[$ratio/$ratio2]</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1965 print HTMLSNP "<td>$DP_P</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1966 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1967 print TABSNP "$code_snp;OK;[$ratio/$ratio2];$DP_P;5' or 2";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1968 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1969 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1970 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1971
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1972 else { # [1/1] [1|1] SNP entre genome1 et genome2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1973 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1974 print TABSNP "$alAlt";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1975 if ($GT_G2 =~ /^1.1$/) { # Genome2 = Alt [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1976 print HTMLSNP "<td>$alAlt</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1977 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1978 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1979 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1980 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."other.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1981 print TABSNP "$alAlt;;;;other;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1982 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1983 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1984 if ($GT_G2 =~ /^0.0$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1985 print HTMLSNP "<td>$alRef</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1986 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1987 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1988 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1989 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."1.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1990 print TABSNP "$alRef;;;;1;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1991 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1992 else { # Genome2 = SNP [0.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1993 print HTMLSNP "<td>$code_snp</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1994 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1995 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1996 print HTMLSNP "<td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1997 print HTMLSNP "<td class=\"final\"><img src=\"".$REPimages."5primeou2.png\" height=30></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1998 print TABSNP "$code_snp;;;;5' or 2;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
1999 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2000 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2001 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2002
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2003 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2004 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2005 $nbSub_only ++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2006 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2007 $ligneOK = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2008 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2009 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2010
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2011 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2012 print HTMLCOUNT "<td class=\"ted2\" style=\"border-right:3px solid black\">$s</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2013 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2014 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2015 print HTMLCOUNT "<td class=\"ted\" style=\"border-right:3px solid black\">$s</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2016 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2017
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2018 print TABCOUNT "Gene;Interval Size;Analysed (pb);nb SNP;1;2;3 or 4;5;5';5'';5' or 1;5'' or 2;other;SNP Diploids;SNP Polyploid;Ratio (%) $genome2Name:$genome1Name;";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2019
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2020 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2021 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2022 $ligneInter = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2023 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2024 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2025 $ligneInter = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2026 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2027 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2028
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2029 # Calcul des intervalles
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2030 $taille_totale = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2031 my $ref = $intervalle2{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2032 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2033
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2034 foreach my $interval(keys(%hash)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2035 my @pos = split(/-/,$interval);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2036 $taille_inter = $pos[1]-$pos[0]-1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2037 $taille_totale = $taille_totale + $taille_inter;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2038 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2039
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2040 $total1 = $case5 + $case1 + $case2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2041 $total2 = $case5 + $case3ou4 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2042
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2043 print HTMLCOUNT "<td>$taille_totale</td><td style=\"border-left:3px solid black\">$taille</td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2044 print HTMLCOUNT "<td style=\"border-left:3px solid black\">$case1</td><td>$case2</td><td>$case3ou4</td><td>$case5</td><td>$caseGenome2</td><td>$caseOther</td><td style=\"border-left:3px solid black\">$total1</td><td style=\"border-left:3px solid black\">$total2</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2045 if ($case5 != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2046 print HTMLCOUNT "<td style=\"border-left:3px solid black\">".sprintf("%.0f", $moyenneSNPindep1/$case5).":".sprintf("%.0f", $moyenneSNPindep2/$case5)."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2047 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2048 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2049 print HTMLCOUNT "<td style=\"border-left:3px solid black\"></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2050 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2051 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2052
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2053 $totalSize = $totalSize + $taille_totale ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2054 $totalSNP = $totalSNP + $taille ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2055 $total11 = $total11 + $case1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2056 $total22 = $total22 + $case2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2057 $total3ou4 = $total3ou4 + $case3ou4 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2058 $total5 = $total5 + $case5 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2059 $total512 = $total512 + $total1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2060 $total534 = $total534 + $total2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2061 $totalOther = $totalOther + $caseOther ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2062 $totalGenome2 = $totalGenome2 + $caseGenome2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2063 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2064 ########## MODIF DERNIERE MINUTE ################"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2065 print HTMLCOUNT "<tr class=\"td3\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2066 print HTMLCOUNT "<td></td><td style=\"border-left:3px solid black\">$totalSize</td><td style=\"border-left:3px solid black\">$totalSNP</td><td style=\"border-left:3px solid black\">$total11</td><td>$total22</td><td>$total3ou4</td><td>$total5</td><td>$totalGenome2</td><td>$totalOther</td><td style=\"border-left:3px solid black\">$total512</td><td style=\"border-left:3px solid black\">$total534</td><td style=\"border-left:3px solid black\"></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2067 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2068 ####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2069 print HTMLSNP "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2070 print HTMLSNP "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2071 print HTMLCOUNT "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2072 print HTMLCOUNT "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2073
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2074 close TABSNP;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2075 close HTMLSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2076 close HTMLCOUNT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2077 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2078
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2079 sub poly_poly_output {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2080 foreach my $s(sort(keys(%snp_final))){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2081 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2082 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2083 print HTMLSNP "<tr class=\"bord1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2084 print HTMLCOUNT "<tr class=\"td1\ border-width =\"3px\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2085 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2086 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2087 print HTMLSNP "<tr class=\"bord2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2088 print HTMLCOUNT "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2089 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2090 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2091
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2092 my $ref = $snp_final{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2093 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2094 $taille = keys(%hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2095
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2096 # taille de la ligne gene
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2097 print HTMLSNP "<td rowspan=\"".$taille."\"><b>".$s."</b></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2098
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2099 $ligneOK = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2100
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2101 $nbPolyploid1 = 0 ; # SNP heterozygosity for P1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2102 $nbPolyploid2 = 0 ; # SNP heterozygosity for P2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2103 $nbCommuns = 0 ; # SNP heterozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2104 $nbCommunHomo = 0 ; # SNP homozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2105 $nbDifferent = 0 ; # [P1] ne [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2106 $alleleCommun = 0 ; # Example : P1 = [A/G] ; P2 = [A]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2107 $alleleDifferent = 0 ; # Example : P1 = [A/G] ; P2 = [C] or [T]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2108 $alleleCommunH = 0 ; # Example : P1 = [A/G] ; P2 = [A/C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2109 $nbHomoDiff = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2110
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2111 @tabTrie = sort ({ $a <=> $b }keys %hash);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2112
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2113 $taille = 0;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2114
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2115
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2116
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2117 #foreach my $c(sort ({$hash{$a} <=> $hash{$b}} keys %hash)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2118 foreach my $c(@tabTrie) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2119
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2120 if ($ligneOK == 1) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2121 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2122 print HTMLSNP "<tr class=\"td1\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2123 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2124 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2125 print HTMLSNP "<tr class=\"td2\">\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2126 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2127 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2128
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2129 #print STDOUT "\n\n\n".$snp_final{$s}{$c} ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2130 ($code_snp,$AD,$GT_poly,$DP_P,$code_snp2,$AD_2,$GT_poly2,$DP_P2) = split(/\t/,$snp_final{$s}{$c});
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2131 ($DP_P, $FDP) = split(/-/, $DP_P);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2132 ($DP_P2, $FDP2) = split(/-/, $DP_P2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2133
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2134 #print STDOUT "\nALLELES :".$AD." - ".$AD_2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2135
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2136 ($sub1_1,$sub1_2) = split(",",$AD);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2137 ($sub2_1,$sub2_2) = split(",",$AD_2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2138
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2139 # $sub1_1 = sprintf("%.0f", $sub1_1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2140 # $sub1_2 = sprintf("%.0f", $sub1_2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2141 # $sub2_1 = sprintf("%.0f", $sub2_1);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2142 # $sub2_2 = sprintf("%.0f", $sub2_2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2143 if ($DP_P > 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2144 $SG1 = ($sub1_1/$DP_P*100) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2145 $SG2 = ($sub1_2/$DP_P*100) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2146 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2147 if ($DP_P2 > 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2148 $SG3 = ($sub2_1/$DP_P2*100) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2149 $SG4 = ($sub2_2/$DP_P2*100) ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2150 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2151
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2152
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2153 if ($GT_poly ne "") { # Polyploide 1 = [0.0] ou [0.1] ou [1.1]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2154 @recupAlleles = split(/\[/,$code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2155 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2156 ($alRef,$alAltP) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2157 # Attribution des alleles au polyploide 1 si pas de SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2158 if ($GT_poly =~ /^0.0$/) { $code_snp = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2159 if ($GT_poly =~ /^1.1$/) { $code_snp = $alAltP ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2160 # Attribution des alleles au polyploide 2 si pas de SNP
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2161 if (($GT_poly2 eq "") || ($GT_poly2 =~ /^0.0$/)) { $code_snp2 = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2162 if ($GT_poly2 =~ /^1.1$/) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2163 @recupAlleles = split(/\[/,$code_snp2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2164 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2165 ($alRef,$alAlt2) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2166 $code_snp2 = $alAlt2 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2167 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2168 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2169 elsif ($GT_poly2 ne "") { # pas de SNP polyploide 1 dans le fichier 1 (fichiers non mergés) -> equivalent de [0.0]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2170 @recupAlleles = split(/\[/,$code_snp2);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2171 @recupAlleles = split(/\]/,$recupAlleles[1]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2172 ($alRef,$alAlt2) = split(/\//,$recupAlleles[0]);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2173 # Attribution des Alleles au polyploide 2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2174 if ($GT_poly2 =~ /^1.1$/) { $code_snp2 = $alAlt2 ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2175 if ($GT_poly2 =~ /^0.0$/) { $code_snp2 = $alRef ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2176 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2177 #print STDOUT "\n($code_snp:$GT_poly) - ($code_snp2:$GT_poly2)" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2178 $noSNPpoly = "ok" ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2179 #____________________________________________________________________________________________________________________________________________
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2180 # [1] P1 = 0/1 ; P2 = 0/1 (2 alleles)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2181 #print STDOUT "\n".($code_snp2 eq $code_snp);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2182 if ((($GT_poly =~ /^0.1$/)||($GT_poly =~ /^1.0$/)) && (($GT_poly2 =~ /^0.1$/)||($GT_poly2 =~ /^1.0$/))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2183
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2184 if (($SG1 > $value_filter_p1) && ($SG2 > $value_filter_p1) && ($SG3 > $value_filter_p2) && ($SG4 > $value_filter_p2) && $code_snp2 eq $code_snp) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2185
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2186
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2187 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2188
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2189 print HTMLSNP "<td class=\"tedG2\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2190 print HTMLSNP "<td class=\"tedG2\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2191 print HTMLSNP "<td class=\"ted2\">".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2192 print HTMLSNP "<td class=\"ted2\">".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2193
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2194 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2195 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2196 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2197 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2198 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2199 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2200
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2201 print HTMLSNP "<td class=\"ted2\">".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2202 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2203 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2204 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2205 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2206 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2207 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2208 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2209 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2210 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2211 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2212
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2213 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2214 print HTMLSNP "<td class=\"ted2\">".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2215 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2216 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2217 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2218 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2219 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2220 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2221 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2222 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2223 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2224 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2225 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2226 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2227 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2228 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2229 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2230 print HTMLSNP "<td class=\"tedG\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2231 print HTMLSNP "<td class=\"tedG\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2232 print HTMLSNP "<td class=\"ted\">".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2233 print HTMLSNP "<td class=\"ted\">".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2234 print HTMLSNP "<td class=\"ted\">".$FDP." / ".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2235 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2236 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2237 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2238 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2239 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2240 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2241 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2242 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2243 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2244 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2245 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2246 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2247 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2248 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2249 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2250 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2251 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2252 print HTMLSNP "<td class=\"ted\">".$FDP2." / ".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2253 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2254 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2255 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2256 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2257 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2258 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2259 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2260 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2261 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2262 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2263 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2264 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2265 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2266 $nbPolyploid1 ++ ; # SNP heterozygosity for P1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2267 $nbPolyploid2 ++ ; # SNP heterozygosity for P2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2268 $nbCommuns ++ ; # SNP heterozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2269 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2270
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2271 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2272 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2273 if (($SG1 > $value_filter_p1) && ($SG2 > $value_filter_p1) && ($SG3 > $value_filter_p2) && ($SG4 > $value_filter_p2)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2274 if ($alAlt2 ne $alAlt) { # P1 [A/G] P2 [A/C] (3 alleles)
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2275
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2276
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2277
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2278 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2279 print HTMLSNP "<td style=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2280 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2281 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2282 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2283 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2284 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2285 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2286 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2287 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2288 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2289 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2290 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2291 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2292 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2293 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2294 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2295 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2296 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2297 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2298 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2299 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2300 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2301 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2302 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2303 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2304 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2305 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2306 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2307 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2308 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2309 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2310 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2311 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2312 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2313 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2314 $alleleCommunH ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2315 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2316 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2317 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2318 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2319 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2320
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2321 else { # ALL
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2322 # COMMON PART
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2323 #print STDOUT "\nBOUM : ".$SG1." + ".$SG2." + ".$SG3." + ".$SG4 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2324 #if (($SG1> $value_filter_p1) && ($SG2> $value_filter_p1) && ($SG3> $value_filter_p2) && ($SG4> $value_filter_p2)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2325
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2326 # print HTMLSNP "<td></td><td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2327
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2328 # [5] P1 = 1/1 ; P2 = 1/1 (1 allele) P1 [A] P2 [A]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2329 if (($GT_poly =~ /^1.1$/) && ($GT_poly2 =~ /^1.1$/)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2330
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2331
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2332 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2333 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2334 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2335 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2336 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2337 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2338 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2339 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2340 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2341 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2342 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2343 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2344 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2345 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2346 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2347 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2348 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2349 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2350 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2351 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2352 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2353 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2354 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2355 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2356 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2357 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2358 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2359 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2360 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2361 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2362 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2363 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2364 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2365 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2366 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2367 #*********************************************************************************************************************
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2368 if ($code_snp2 eq $code_snp) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2369 $nbCommunHomo ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2370 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2371 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2372 else { # (2 alleles) P1 [A] P2 [C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2373 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2374 $nbHomoDiff ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2375 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2376 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2377 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2378 # [2] [4] P1 = 0/1 ; P2 = 1/1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2379 if (((($GT_poly =~ /^0.1$/) || ($GT_poly =~ /^0.1$/)) && ($GT_poly2 =~ /^1.1$/))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2380 if (($SG1> $value_filter_p1) && ($SG2> $value_filter_p1)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2381
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2382
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2383
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2384 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2385 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2386 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2387 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2388 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2389 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2390 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2391 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2392 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2393 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2394 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2395 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2396 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2397 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2398 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2399 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2400 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2401 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2402 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2403 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2404 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2405 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2406 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2407 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2408 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2409 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2410 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2411 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2412 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2413 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2414 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2415 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2416 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2417 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2418 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2419 if ($alAlt2 ne $alAlt) { # (2 alleles) P1 [A/G] P2 [G]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2420 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2421 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2422 $nbPolyploid1 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2423 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2424 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2425 else { # (3 alleles) P1 [A/G] P2 [C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2426 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2427 $alleleDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2428 $nbPolyploid1 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2429 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2430 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2431 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2432 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2433 if ((($GT_poly2 =~ /^0.1$/) || ($GT_poly2 =~ /^0.1$/)) && ($GT_poly =~ /^1.1$/)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2434 if (($SG3> $value_filter_p2) && ($SG4> $value_filter_p2)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2435 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2436 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2437 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2438 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2439 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2440 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2441 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2442 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2443 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2444 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2445 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2446 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2447 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2448 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2449 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2450 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2451 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2452 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2453 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2454 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2455 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2456 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2457 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2458 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2459 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2460 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2461 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2462 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2463 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2464 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2465 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2466 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2467 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2468 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2469 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2470 if ($alAlt2 ne $alAlt) { # (2 alleles) P1 [A/G] P2 [G]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2471 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2472 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2473 $nbPolyploid2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2474 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2475 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2476 else { # (3 alleles) P1 [A/G] P2 [C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2477 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2478 $alleleDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2479 $nbPolyploid2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2480 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2481 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2482 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2483 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2484 # [3] [7] P1 = 0/1 ; P2 = 0/0 (2 alleles) P1 [A/G] P2 [A]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2485 if ((($GT_poly =~ /^0.1$/) || ($GT_poly =~ /^0.1$/)) && (($GT_poly2 =~ /^0.0$/) || ($GT_poly2 eq ""))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2486 if (($SG1> $value_filter_p1) && ($SG2> $value_filter_p1)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2487 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2488 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2489 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2490 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2491 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2492 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2493 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2494 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2495 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2496 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2497 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2498 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2499 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2500 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2501 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2502 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2503 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2504 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2505 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2506 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2507 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2508 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2509 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2510 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2511 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2512 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2513 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2514 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2515 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2516 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2517 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2518 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2519 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2520 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2521 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2522
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2523 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2524 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2525 $nbPolyploid1 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2526 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2527 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2528 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2529 if ((($GT_poly2 =~ /^0.1$/) || ($GT_poly2 =~ /^0.1$/)) && (($GT_poly =~ /^0.0$/) || ($GT_poly eq ""))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2530 if (($SG3> $value_filter_p2) && ($SG4> $value_filter_p2)) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2531 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2532 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2533 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2534 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2535 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2536 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2537 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2538 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2539 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2540 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2541 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2542 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2543 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2544 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2545 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2546 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2547 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2548 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2549 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2550 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2551 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2552 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2553 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2554 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2555 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2556 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2557 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2558 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2559 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2560 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2561 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2562 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2563 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2564 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2565 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2566 ############
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2567 # HERE P2 #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2568 ############
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2569 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2570 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2571 $nbPolyploid2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2572 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2573 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2574 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2575 # [6] [8] P1 = 1/1 ; P2 = 0/0
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2576 if (($GT_poly =~ /^1.1$/) && (($GT_poly2 =~ /^0.0$/) || ($GT_poly2 eq ""))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2577 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2578 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2579 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2580 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2581 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2582 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2583 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2584 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2585 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2586 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2587 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2588 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2589 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2590 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2591 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2592 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2593 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2594 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2595 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2596 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2597 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2598 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2599 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2600 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2601 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2602 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2603 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2604 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2605 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2606 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2607 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2608 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2609 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2610 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2611 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2612 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2613 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2614 $nbPolyploid1 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2615 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2616 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2617 if (($GT_poly2 =~ /^1.1$/) && (($GT_poly =~ /^0.0$/) || ($GT_poly eq ""))) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2618 print HTMLSNP "<td style=\"border-left:3px solid black\">".$c."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2619 print HTMLSNP "<td class=\"border-left:3px solid black\">".$alRef."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2620 print HTMLSNP "<td>".$code_snp."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2621 print HTMLSNP "<td>".$code_snp2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2622 print HTMLSNP "<td>".$FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2623 print TABSNP $s . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2624 print TABSNP $c . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2625 print TABSNP $alRef . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2626 print TABSNP $code_snp . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2627 print TABSNP $code_snp2 . "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2628 print TABSNP $FDP."/".$DP_P;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2629 if (($DP_P) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2630 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2631 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP/$DP_P*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2632 print HTMLSNP "<br>".$sub1_1." - ".$sub1_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2633 print TABSNP "," . $sub1_1." - ".$sub1_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2634 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2635 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2636 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2637 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2638 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2639 print TABSNP $FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2640 print HTMLSNP "<td>".$FDP2."/".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2641 if (($DP_P2) != 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2642 print HTMLSNP "<br><img src=\"".$REPimages."r1.png\" height=5 width=".sprintf("%.0f", $FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2643 print HTMLSNP "<img src=\"".$REPimages."r2.png\" height=5 width=".sprintf("%.0f", 100-$FDP2/$DP_P2*100).">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2644 print HTMLSNP "<br>".$sub2_1." - ".$sub2_2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2645 print TABSNP "," . $sub2_1." - ".$sub2_2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2646 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2647 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2648 print HTMLSNP "</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2649 print TABSNP "\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2650 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2651 print TABSNP "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2652 print HTMLSNP "</tr>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2653 $nbDifferent ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2654 $alleleCommun ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2655 $nbPolyploid2 ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2656 $taille++;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2657 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2658 #}
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2659 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2660
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2661
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2662 #print TABSNP $s."\t".$c."\t".$alRef."\t".$code_snp."\t".$code_snp2."\t".$FDP."\t".$DP_P."\t".$FDP2."\t".$DP_P2;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2663
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2664 $ligneOK = 1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2665 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2666
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2667
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2668 if (($nbCommuns + $nbCommunHomo + $nbDifferent + $nbHomoDiff + $alleleCommun + $alleleDifferent + $alleleCommunH + $nbPolyploid1 + $nbPolyploid2) > 0 ) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2669
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2670 if ($ligneInter == 0) {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2671 print HTMLCOUNT "<td class=\"ted2\" style=\"border-right:3px solid black\">".$s."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2672 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2673 else {
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2674 print HTMLCOUNT "<td class=\"ted\" style=\"border-right:3px solid black\">".$s."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2675 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2676 print TABCOUNT $s."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2677
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2678 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2679 if ($ligneInter == 0) { $ligneInter = 1 ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2680 else { $ligneInter = 0 ; }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2681 #######################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2682
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2683 # Calcul des intervalles #
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2684 ##########################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2685 $taille_totale = 0 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2686 my $ref = $intervalle2{$s};
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2687 my %hash = %$ref;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2688
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2689 foreach my $interval(keys(%hash)){
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2690 my @pos = split(/-/,$interval);
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2691 $taille_inter = $pos[1]-$pos[0]+1 ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2692 $taille_totale = $taille_totale + $taille_inter;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2693 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2694 $total1 = $case5 + $case1 + $case2 + $casePolyplother;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2695 $total2 = $case5 + $case3ou4 + $caseDiplother;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2696
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2697 # SYNTHESIS
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2698
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2699 print HTMLCOUNT "<td>".$taille_totale."</td><td style=\"border-left:3px solid black\">".$taille. "</td></td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2700 print HTMLCOUNT "<td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2701 print HTMLCOUNT $nbCommuns."</td><td>".$nbCommunHomo."</td><td style=\"border-left:3px solid black\">".$nbDifferent."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2702 print HTMLCOUNT $nbHomoDiff."</td><td>".$alleleCommun."</td><td>".$alleleDifferent."</td><td>".$alleleCommunH."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2703 print HTMLCOUNT "<td style=\"border-left:3px solid black\">".$nbPolyploid1."</td><td>".$nbPolyploid2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2704 print TABCOUNT $taille_totale."\t".$taille."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2705 print TABCOUNT $nbCommuns."\t".$nbCommunHomo."\t".$nbDifferent."\t".$nbHomoDiff."\t".$alleleCommun."\t".$alleleDifferent."\t".$alleleCommunH."\t".$nbPolyploid1."\t".$nbPolyploid2."\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2706
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2707 $nbTotGenesAna ++ ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2708
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2709 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2710 print TABCOUNT "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2711
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2712 $totalSize = $totalSize + $taille_totale ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2713 $totalSNP = $totalSNP + $taille ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2714 $totalNbPolyploid1 = $totalNbPolyploid1 + $nbPolyploid1 ; # SNP heterozygosity for P1
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2715 $totalNbPolyploid2 = $totalNbPolyploid2 + $nbPolyploid2 ; # SNP heterozygosity for P2
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2716 $totalNbCommuns = $totalNbCommuns + $nbCommuns ; # SNP heterozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2717 $totalNbCommunsHomo = $totalNbCommunsHomo + $nbCommunHomo ; # SNP homozygosity [P1] = [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2718 $totalNbDifferent = $totalNbDifferent + $nbDifferent ; # [P1] ne [P2]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2719 $totalNbAlleleCommun = $totalNbAlleleCommun + $alleleCommun ; # Example : P1 = [A/G] ; P2 = [A]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2720 $totalAlleleDifferent = $totalAlleleDifferent + $alleleDifferent ; # Example : P1 = [A/G] ; P2 = [C] or [T]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2721 $totalAlleleCommunH = $totalAlleleCommunH + $alleleCommunH ; # Example : P1 = [A/G] ; P2 = [A/C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2722 $totalNbHomoDiff = $totalNbHomoDiff + $nbHomoDiff ; # Example : P1 = [A/G] ; P2 = [A/C]
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2723 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2724
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2725
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2726
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2727
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2728 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2729 ########## MODIF DERNIERE MINUTE ################"
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2730 print HTMLCOUNT "<tr class=\"td3\">\n<td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2731
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2732 print HTMLCOUNT $nbTotGenesAna."<td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2733 print HTMLCOUNT $totalSize."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2734 print HTMLCOUNT $totalSNP."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2735 print HTMLCOUNT $totalNbCommuns."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2736 print HTMLCOUNT $totalNbCommunsHomo."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2737 print HTMLCOUNT $totalNbDifferent."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2738 print HTMLCOUNT $totalNbHomoDiff."</td><td style=\"border-left:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2739 print HTMLCOUNT $totalNbAlleleCommun."</td><td style=\"border:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2740 print HTMLCOUNT $totalAlleleDifferent."</td><td style=\"border:3px solid black\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2741 print HTMLCOUNT $totalAlleleCommunH."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2742 print HTMLCOUNT $totalNbPolyploid1."</td><td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2743 print HTMLCOUNT $totalNbPolyploid2."</td>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2744 print HTMLCOUNT "</tr>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2745
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2746
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2747 print TABCOUNT "$nbTotGenesAna\t$totalSize\t$totalSNP\t$totalNbCommuns\t$totalNbCommunsHomo\t$totalNbDifferent\t$totalNbHomoDiff\t$totalNbAlleleCommun\t$totalAlleleDifferent\t$totalAlleleCommunH\t$totalNbPolyploid1\t$totalNbPolyploid2\t";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2748 print TABCOUNT "\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2749
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2750 ####################################################
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2751 print HTMLSNP "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2752 print HTMLSNP "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2753 close HTMLSNP ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2754
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2755 print HTMLCOUNT "</table>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2756 print HTMLCOUNT "</html>\n";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2757 close HTMLCOUNT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2758
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2759 close TABSNP;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2760 close TABCOUNT ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2761
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2762 # tie @array, 'Tie::File', $SNP_count or die ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2763 # $array[82] = "<table class=\"tab2\"><th class=\"th\" style=\"text-align:left;\">";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2764 # $array[83] = "<br>".$nbTotGenesAna." analysed genes";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2765 # $array[84] = "<br>".$nbTotGenesVal." with SNP validation";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2766 # $array[85] = "<br>Analysis performed on ".$totalSize." bp";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2767 # $array[86] = "<br>".$totalSNP." SNP";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2768 # $array[87] = "<br><img src=\"".$REPimages."5v.png\" WIDTH=20> : ".$total5." validated SNP";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2769 # $array[88] = "<br><br><img src=\"".$REPimages."1.png\" WIDTH=20> : ".$total11."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2770 # $array[89] = "<br><img src=\"".$REPimages."2.png\" WIDTH=20> : ".$total22."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2771 # $array[90] = "<br><img src=\"".$REPimages."3ou4.png\" WIDTH=20> : ".$total3ou4."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2772 # $array[91] = "<br>Other SNP types : ".$totalOther."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2773 # $array[92] = "<br>Heterozygosity for genome 1 : ".$totalGenome2."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2774 # $array[93] = "<br>SNP between parental genomes (diploids) : ".$total512."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2775 # $array[94] = "<br>SNP polyploid : ".$total534."";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2776 # $array[95] = "<th class=\"th\"><img src=\"".$REPimages."arbre.png\" WIDTH=400></th></table>";
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2777 }
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2778
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2779 $time2 = time ;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2780 $tmps = $time2 - $time;
e94de0ea3351 Uploaded
dereeper
parents:
diff changeset
2781 print STDOUT "\n\nTemps execution : ".$tmps."\n";