annotate rapsodyn/MergeLogFiles.pl @ 15:56d328bce3a7 draft default tip

Uploaded
author mcharles
date Thu, 29 Jan 2015 08:54:06 -0500
parents 827da1a9a326
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
1 #!/usr/bin/perl
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
2 #V1.0.0
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
3 use strict;
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
4 use warnings;
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
5 use Getopt::Long;
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
6
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
7
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
8 my $input_log_files;
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
9 GetOptions (
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
10 "input_log_files=s" => \$input_log_files
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
11 ) or die("Error in command line arguments\n");
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
12
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
13 my @files = split(/,/,$input_log_files);
13
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
14
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
15
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
16
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
17 my $FastqPrep_detected=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
18 my $FastqPrep_type="NA";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
19 my $FastqPrep_before_read1_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
20 my $FastqPrep_before_read1_nbbases=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
21 my $FastqPrep_before_read2_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
22 my $FastqPrep_before_read2_nbbases=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
23 my $FastqPrep_after_read1_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
24 my $FastqPrep_after_read1_nbbases=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
25 my $FastqPrep_after_read2_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
26 my $FastqPrep_after_read2_nbbases=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
27
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
28 my $Samfilter_detected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
29 my %Samfilter_before_hash;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
30 my %Samfilter_after_hash;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
31 my $Samfilter_before_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
32 my $Samfilter_after_nbreads=0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
33
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
34 my $Pileupvariant_detected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
35 my $Pileupvariant="";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
36
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
37 my $Listfiltering_detected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
38 my $Listfiltering="";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
39
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
40 my $Pileupfiltering_detected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
41 my $Pileupfiltering="";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
42
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
43 my $Blastfiltering_detected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
44 my $Blastfiltering_checked = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
45 my $Blastfiltering_selected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
46
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
47
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
48
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
49 for (my $f=0;$f<=$#files;$f++){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
50 my $current_file = $files[$f];
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
51 open(IN, $current_file) or die ("Can't open $current_file\n");
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
52 if ( -z IN){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
53 next;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
54 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
55
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
56 while (my $line =<IN>){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
57 if ($line =~ /Fastq preparation/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
58 $FastqPrep_detected=1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
59 my $line1 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
60 my $line2 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
61 my $line3 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
62 my $line4 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
63 my $line5 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
64 my $line6 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
65 my $line7 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
66 if ($line1=~/Fastq format \:\s*(\w+)\s*/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
67 $FastqPrep_type=$1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
68 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
69 if ($line3=~/.*?\:\s*(\d+).*?\:\s*(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
70 $FastqPrep_before_read1_nbreads += $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
71 $FastqPrep_before_read1_nbbases += $2;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
72 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
73 if ($line4=~/.*?\:\s*(\d+).*?\:\s*(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
74 $FastqPrep_before_read2_nbreads += $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
75 $FastqPrep_before_read2_nbbases += $2;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
76 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
77 if ($line6=~/.*?\:\s*(\d+).*?\:\s*(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
78 $FastqPrep_after_read1_nbreads += $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
79 $FastqPrep_after_read1_nbbases += $2;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
80 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
81 if ($line7=~/.*?\:\s*(\d+).*?\:\s*(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
82 $FastqPrep_after_read2_nbreads += $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
83 $FastqPrep_after_read2_nbbases += $2;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
84 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
85
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
86 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
87 elsif ($line =~ /Blast filtering/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
88 $Blastfiltering_detected=1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
89 my $line1 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
90 my $line2 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
91 my $current_checked = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
92 my $current_selected = 0;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
93 if ($line1=~/(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
94 $current_checked = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
95 $Blastfiltering_checked += $current_checked;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
96 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
97 if ($line2=~/(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
98 $current_selected = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
99 $Blastfiltering_selected += $current_selected;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
100 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
101
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
102 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
103 elsif ($line=~/Sam filtering/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
104 $Samfilter_detected=1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
105 my $line1 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
106 my $line2 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
107 my $line3 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
108 my $line4 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
109 my $line5 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
110 my $line6 = <IN>;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
111 my @tbl_score_before = split(/[\*\:]/,$line2);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
112 my @tbl_number_before = split(/[\*\:]/,$line3);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
113
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
114 my @tbl_score_after = split(/[\*\:]/,$line5);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
115 my @tbl_number_after = split(/[\*\:]/,$line6);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
116
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
117 if ($#tbl_score_before != $#tbl_number_before){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
118 print STDERR "Error Formating in Sam Filtering\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
119 exit(0);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
120 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
121 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
122 for (my $i=0;$i<=$#tbl_score_before;$i++){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
123 if ($tbl_score_before[$i] =~ /(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
124 my $current_score_before = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
125 if ($tbl_number_before[$i] =~ /(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
126 my $current_number_before = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
127 $Samfilter_before_nbreads += $current_number_before;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
128 if ($Samfilter_before_hash{$current_score_before}){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
129 $Samfilter_before_hash{$current_score_before} += $current_number_before;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
130 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
131 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
132 $Samfilter_before_hash{$current_score_before} = $current_number_before;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
133 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
134 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
135 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
136 print STDERR "Error Formating in Sam Filtering\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
137 exit(0);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
138 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
139 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
140 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
141 next;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
142 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
143 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
144 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
145
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
146 if ($#tbl_score_after != $#tbl_number_after){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
147 print STDERR "Error Formating in Sam Filtering\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
148 exit(0);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
149 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
150 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
151 for (my $i=0;$i<=$#tbl_score_after;$i++){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
152 if ($tbl_score_after[$i] =~ /(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
153 my $current_score_after = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
154 if ($tbl_number_after[$i] =~ /(\d+)/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
155 my $current_number_after = $1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
156 $Samfilter_after_nbreads += $current_number_after;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
157 if ($Samfilter_after_hash{$current_score_after}){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
158 $Samfilter_after_hash{$current_score_after} += $current_number_after;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
159 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
160 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
161 $Samfilter_after_hash{$current_score_after} = $current_number_after;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
162 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
163 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
164 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
165 print STDERR "Error Formating in Sam Filtering\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
166 exit(0);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
167 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
168 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
169 else {
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
170 next;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
171 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
172 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
173 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
174 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
175 elsif ($line=~/Variant extraction/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
176 $Pileupvariant_detected=1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
177 $Pileupvariant .= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
178 while ($line = <IN>){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
179 $Pileupvariant .= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
180 if ($line=~/^\s*$/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
181 last;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
182 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
183 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
184 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
185 elsif ($line=~/List Filtering/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
186 $Listfiltering_detected =1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
187 $Listfiltering .= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
188 while ($line = <IN>){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
189 $Listfiltering .= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
190 if ($line=~/^\s*$/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
191 last;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
192 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
193 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
194 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
195 elsif ($line=~/MPileup filtering/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
196 $Pileupfiltering_detected =1;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
197 $Pileupfiltering.= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
198 while ($line = <IN>){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
199 $Pileupfiltering .= $line;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
200 if ($line=~/^\s*$/){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
201 last;
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
202 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
203 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
204 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
205
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
206 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
207 close (IN);
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
208 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
209
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
210 if ($FastqPrep_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
211 print "####\tFastq preparation\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
212 print "Fastq format : ",$FastqPrep_type,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
213 print "## Before preparation\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
214 print "#Read1 : ",$FastqPrep_before_read1_nbreads,"\t#Base : ",$FastqPrep_before_read1_nbbases,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
215 print "#Read2 : ",$FastqPrep_before_read2_nbreads,"\t#Base : ",$FastqPrep_before_read2_nbbases,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
216 print "## After preparation\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
217 print "#Read1 : ",$FastqPrep_after_read1_nbreads,"\t#Base : ",$FastqPrep_after_read1_nbbases,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
218 print "#Read2 : ",$FastqPrep_after_read2_nbreads,"\t#Base : ",$FastqPrep_after_read2_nbbases,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
219 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
220 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
221
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
222
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
223 if ($Samfilter_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
224 print "#### Sam filtering \n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
225 print "## Before filtering ($Samfilter_before_nbreads)\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
226 print "bitscore :";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
227 foreach my $key (sort{$Samfilter_before_hash{$b}<=>$Samfilter_before_hash{$a}} keys %Samfilter_before_hash){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
228 print "\t$key\t*";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
229 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
230 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
231 print " number :";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
232 foreach my $key (sort{$Samfilter_before_hash{$b}<=>$Samfilter_before_hash{$a}} keys %Samfilter_before_hash){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
233 print "\t",$Samfilter_before_hash{$key},"\t*";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
234 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
235 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
236 print "## After filtering ($Samfilter_after_nbreads)\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
237 print "bitscore :";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
238 foreach my $key (sort{$Samfilter_after_hash{$b}<=>$Samfilter_after_hash{$a}} keys %Samfilter_after_hash){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
239 print "\t$key\t";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
240 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
241 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
242 print " number :";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
243 foreach my $key (sort{$Samfilter_after_hash{$b}<=>$Samfilter_after_hash{$a}} keys %Samfilter_after_hash){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
244 print "\t",$Samfilter_after_hash{$key},"\t*";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
245 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
246 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
247 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
248 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
249
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
250 if ($Pileupvariant_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
251 print $Pileupvariant,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
252 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
253
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
254 if ($Listfiltering_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
255 print $Listfiltering,"\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
256 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
257
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
258 if ($Blastfiltering_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
259 print "#### Blast filtering\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
260 print "Variant checked :\t$Blastfiltering_checked\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
261 print "Variant selected :\t$Blastfiltering_selected\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
262 print "\n";
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
263 }
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
264
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
265 if ($Pileupfiltering_detected == 1){
827da1a9a326 Uploaded
mcharles
parents: 10
diff changeset
266 print $Pileupfiltering,"\n";
10
0a6c1cfe4dc8 Uploaded
mcharles
parents:
diff changeset
267 }