comparison bin/piPipe.pl @ 29:0a47c6cf912d draft

Uploaded
author romaingred
date Thu, 09 Nov 2017 05:28:50 -0500
parents aea6ed0da85b
children 241aa6141cac
comparison
equal deleted inserted replaced
28:aea6ed0da85b 29:0a47c6cf912d
14 use Rcall qw (pie_chart bg_to_png ); 14 use Rcall qw (pie_chart bg_to_png );
15 use align qw ( to_build get_unique sam_count sam_count_mis sam_sorted_bam rpms_rpkm BWA_call get_fastq_seq extract_sam sam_to_bam_bg ); 15 use align qw ( to_build get_unique sam_count sam_count_mis sam_sorted_bam rpms_rpkm BWA_call get_fastq_seq extract_sam sam_to_bam_bg );
16 use html qw ( main_page details_pages menu_page ppp_page ); 16 use html qw ( main_page details_pages menu_page ppp_page );
17 use File::Copy; 17 use File::Copy;
18 18
19 my ( @fastq, @fastq_n, $dir, $min, $max, $mis, $misTE, $help, $Pcheck, $Dcheck, $mapnumf, $html_out); 19 my ( @fastq, @fastq_n, $dir, $min, $max, $mis, $misTE, $help, $Pcheck, $mapnumf, $html_out);
20 my ( $ref, $tRNAs, $rRNAs, $snRNAs, $miRNAs, $exons, $TE ); 20 my ( $ref, $tRNAs, $rRNAs, $snRNAs, $miRNAs, $exons, $TE );
21 my ( $si_min, $si_max, $pi_min, $pi_max ); 21 my ( $si_min, $si_max, $pi_min, $pi_max );
22 my ( $build_index, $build_tRNAs, $build_rRNAs, $build_snRNAs, $build_miRNAs, $build_exons, $build_TE ); 22 my ( $build_index, $build_tRNAs, $build_rRNAs, $build_snRNAs, $build_miRNAs, $build_exons, $build_TE );
23 my $max_procs = 8; 23 my $max_procs = 8;
24 24
38 "pi_max:i" => \$pi_max, 38 "pi_max:i" => \$pi_max,
39 "mis:i" => \$mis, 39 "mis:i" => \$mis,
40 "misTE:i" => \$misTE, 40 "misTE:i" => \$misTE,
41 "html:s" => \$html_out, 41 "html:s" => \$html_out,
42 "PPPon:s" => \$Pcheck, 42 "PPPon:s" => \$Pcheck,
43 "Dison:s" => \$Dcheck,
44 "help" => \$help, 43 "help" => \$help,
45 "ref:s" => \$ref, 44 "ref:s" => \$ref,
46 "tRNAs:s" => \$tRNAs, 45 "tRNAs:s" => \$tRNAs,
47 "rRNAs:s" => \$rRNAs, 46 "rRNAs:s" => \$rRNAs,
48 "snRNAs:s" => \$snRNAs, 47 "snRNAs:s" => \$snRNAs,
211 my ( $TEs_count, $TEs_ref_size, $TEs_count_NoM, $TEs_count_M ) = sam_count_mis ( $type_sam_TEs ); 210 my ( $TEs_count, $TEs_ref_size, $TEs_count_NoM, $TEs_count_M ) = sam_count_mis ( $type_sam_TEs );
212 my $TEs_count_file = $type_dir.$type_prefix.'TEs_reads_counts.txt'; 211 my $TEs_count_file = $type_dir.$type_prefix.'TEs_reads_counts.txt';
213 my $TEs_count_file_M = $type_dir.$type_prefix.'TEs_reads_counts_mismatches.txt'; 212 my $TEs_count_file_M = $type_dir.$type_prefix.'TEs_reads_counts_mismatches.txt';
214 my $TEs_count_file_noM = $type_dir.$type_prefix.'TEs_reads_counts_nomismatches.txt'; 213 my $TEs_count_file_noM = $type_dir.$type_prefix.'TEs_reads_counts_nomismatches.txt';
215 rpms_rpkm( $TEs_count, $TEs_ref_size, $ma, $TEs_count_file, $pi, $mi, $bo ); 214 rpms_rpkm( $TEs_count, $TEs_ref_size, $ma, $TEs_count_file, $pi, $mi, $bo );
216 rpms_rpkm( $TEs_count_NoM, $TEs_ref_size, $ma, $TEs_count_file_M, $pi, $mi, $bo ); 215 rpms_rpkm( $TEs_count_NoM, $TEs_ref_size, $ma, $TEs_count_file_noM, $pi, $mi, $bo );
217 rpms_rpkm( $TEs_count_M, $TEs_ref_size, $ma, $TEs_count_file_noM, $pi, $mi, $bo ); 216 rpms_rpkm( $TEs_count_M, $TEs_ref_size, $ma, $TEs_count_file_M, $pi, $mi, $bo );
218 217
219 sam_to_bam_bg ( $type_sam_TEs, $scale, $grand_child ); 218 sam_to_bam_bg ( $type_sam_TEs, $scale, $grand_child );
220 sam_sorted_bam ( $type_sam_exons, $grand_child ); sam_sorted_bam ( $type_sam_uni_exons, $grand_child ); 219 sam_sorted_bam ( $type_sam_exons, $grand_child ); sam_sorted_bam ( $type_sam_uni_exons, $grand_child );
221 sam_sorted_bam ( $type_sam_uni_TEs, $grand_child ); 220 sam_sorted_bam ( $type_sam_uni_TEs, $grand_child );
222 221
235 bg_to_png ( $fai_file, $type_dir.$type_prefix.'genome_unique_plus.bedgraph', $type_dir.$type_prefix.'genome_unique_minus.bedgraph', $Gviz_genome_uni, 'Mb' ); 234 bg_to_png ( $fai_file, $type_dir.$type_prefix.'genome_unique_plus.bedgraph', $type_dir.$type_prefix.'genome_unique_minus.bedgraph', $Gviz_genome_uni, 'Mb' );
236 bg_to_png ( $fai_file, $type_dir.$type_prefix.'genome_plus.bedgraph', $type_dir.$type_prefix.'genome_minus.bedgraph', $Gviz_genome_rand, 'Mb' ); 235 bg_to_png ( $fai_file, $type_dir.$type_prefix.'genome_plus.bedgraph', $type_dir.$type_prefix.'genome_minus.bedgraph', $Gviz_genome_rand, 'Mb' );
237 236
238 #HTML Details 237 #HTML Details
239 my $prefix_details_pages = $dir.$fastq_n[$child].'-'.$types_names[$grand_child]; 238 my $prefix_details_pages = $dir.$fastq_n[$child].'-'.$types_names[$grand_child];
240 details_pages ( $type_dir, $prefix_details_pages, \@fastq_n, $fastq_n[$child], $misTE, $dir ); 239 details_pages ( $type_dir, $prefix_details_pages, \@fastq_n, $fastq_n[$child], $misTE, $dir, $Pcheck );
241 240
242 $pm2->finish(); 241 $pm2->finish();
243 } 242 }
244 $pm2->wait_all_children; 243 $pm2->wait_all_children;
245 244