Mercurial > repos > romaingred > pirna_pipeline
comparison bin/piPipe.pl @ 49:71ac58e0d5be draft
Uploaded
author | romaingred |
---|---|
date | Fri, 01 Dec 2017 08:54:25 -0500 |
parents | 851c8bbb3214 |
children | d9059a181872 |
comparison
equal
deleted
inserted
replaced
48:6936e45f6c80 | 49:71ac58e0d5be |
---|---|
117 mkdir $size_dir; | 117 mkdir $size_dir; |
118 | 118 |
119 my $fastq_resized = $dir_fq.$name.'_'.$min.'-'.$max.'.fastq'; | 119 my $fastq_resized = $dir_fq.$name.'_'.$min.'-'.$max.'.fastq'; |
120 size_distribution ( $fastq[$child], $fastq_resized, $size_dir, $min, $max ); | 120 size_distribution ( $fastq[$child], $fastq_resized, $size_dir, $min, $max ); |
121 | 121 |
122 my $sam_genome = $gen_dir.$fastq_n[$child].'_'.$min.'-'.max.'sam'; | 122 my $sam_genome = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max.'sam'; |
123 my $sam_genome_unique = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max.'_unique.sam'; | 123 my $sam_genome_unique = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max.'_unique.sam'; |
124 my $fastq_prefix = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max; | 124 my $fastq_prefix = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max; |
125 | 125 |
126 BWA_call ( $ref, $fastq_resized, $sam_genome, $mis, $proc_child, $report ); | 126 BWA_call ( $ref, $fastq_resized, $sam_genome, $mis, $proc_child, $report ); |
127 my ( $fai_ref_hashP, $ma, $ma_uni ) = get_unique ( $sam_genome, $sam_genome_unique, $gen_dir, $fq_collection.$fastq_n[$child], 1, $report ); | 127 my ( $fai_ref_hashP, $ma, $ma_uni ) = get_unique ( $sam_genome, $sam_genome_unique, $gen_dir, $fq_collection.$fastq_n[$child], 1, $report ); |
146 close $gfai; | 146 close $gfai; |
147 bg_to_png ( $fai_file, $fastq_prefix.'_unique_plus.bedgraph', $fastq_prefix.'_unique_minus.bedgraph', $Gviz_dir_uni, 'Mb' ); | 147 bg_to_png ( $fai_file, $fastq_prefix.'_unique_plus.bedgraph', $fastq_prefix.'_unique_minus.bedgraph', $Gviz_dir_uni, 'Mb' ); |
148 bg_to_png ( $fai_file, $fastq_prefix.'_plus.bedgraph', $fastq_prefix.'_minus.bedgraph', $Gviz_dir_rand, 'Mb' ); | 148 bg_to_png ( $fai_file, $fastq_prefix.'_plus.bedgraph', $fastq_prefix.'_minus.bedgraph', $Gviz_dir_rand, 'Mb' ); |
149 | 149 |
150 my $group_dir = $dir_fq.'subgroups/'; | 150 my $group_dir = $dir_fq.'subgroups/'; |
151 my $fastq_uni = $fq_collection.$fastq_n[$child].'unique_mappers.fastq'; | 151 my $fastq_uni = $fq_collection.$fastq_n[$child].'_unique_mappers.fastq'; |
152 my $fastq_all = $fq_collection.$fastq_n[$child].'all_mappers.fastq'; | 152 my $fastq_all = $fq_collection.$fastq_n[$child].'_all_mappers.fastq'; |
153 my ($bo, $mi, $pi) = subgroups ( $fastq_all, $group_dir, $mis, $misTE, $proc_child, $tRNAs, $rRNAs, $snRNAs, $miRNAs, $transcripts, $TE, $si_min, $si_max, $pi_min, $pi_max, $report); | 153 my ($bo, $mi, $pi) = subgroups ( $fastq_all, $group_dir, $mis, $misTE, $proc_child, $tRNAs, $rRNAs, $snRNAs, $miRNAs, $transcripts, $TE, $si_min, $si_max, $pi_min, $pi_max, $report); |
154 | 154 |
155 pie_chart($group_dir); | 155 pie_chart($group_dir); |
156 | 156 |
157 open (my $dupnum, $gen_dir.'dup_mapnum.txt') || die "cannot open dup_mapnum.txt $!"; | 157 open (my $dupnum, $gen_dir.'dup_mapnum.txt') || die "cannot open dup_mapnum.txt $!"; |
181 my $type_prefix = $types_names[$grand_child].'-'; | 181 my $type_prefix = $types_names[$grand_child].'-'; |
182 mkdir $type_dir; | 182 mkdir $type_dir; |
183 $pm2->start($types[$grand_child]) and next; | 183 $pm2->start($types[$grand_child]) and next; |
184 my ( $type_sam_genome, $type_sam_TEs, $type_sam_transcripts ) = ( $type_dir.$type_prefix.'genome.sam', $type_dir.$type_prefix.'TEs.sam', $type_dir.$type_prefix.'transcripts.sam' ); | 184 my ( $type_sam_genome, $type_sam_TEs, $type_sam_transcripts ) = ( $type_dir.$type_prefix.'genome.sam', $type_dir.$type_prefix.'TEs.sam', $type_dir.$type_prefix.'transcripts.sam' ); |
185 my ( $type_sam_uni_genome, $type_sam_uni_TEs, $type_sam_uni_transcripts ) = ( $type_dir.$type_prefix.'genome_unique.sam', $type_dir.$type_prefix.'TEs_unique.sam', $type_dir.$type_prefix.'transcripts_unique.sam' ); | 185 my ( $type_sam_uni_genome, $type_sam_uni_TEs, $type_sam_uni_transcripts ) = ( $type_dir.$type_prefix.'genome_unique.sam', $type_dir.$type_prefix.'TEs_unique.sam', $type_dir.$type_prefix.'transcripts_unique.sam' ); |
186 my ( $type_uni_genome_fastq, $type_uni_TEs_fastq, $type_uni_transcripts_fastq ) = ( $fq_collection.$fastq_n[$child].$type_prefix.'genome_uni.fastq', $fq_collection.$fastq_n[$child].$type_prefix.'TEs_uni.fastq', $fq_collection.$fastq_n[$child].$type_prefix.'transcripts_uni.fastq'); | 186 my ( $type_uni_genome_fastq, $type_uni_TEs_fastq, $type_uni_transcripts_fastq ) = ( $fq_collection.$fastq_n[$child].'-'.$type_prefix.'genome_uni.fastq', $fq_collection.$fastq_n[$child].'-'.$type_prefix.'TEs_uni.fastq', $fq_collection.$fastq_n[$child].'-'.$type_prefix.'transcripts_uni.fastq'); |
187 my ( $type_genome_fastq, $type_TEs_fastq, $type_transcripts_fastq ) = ( $fq_collection.$fastq_n[$child].$type_prefix.'genome.fastq', $fq_collection.$fastq_n[$child].$type_prefix.'TEs.fastq', $fq_collection.$fastq_n[$child].$type_prefix.'transcripts.fastq'); | 187 my ( $type_genome_fastq, $type_TEs_fastq, $type_transcripts_fastq ) = ( $fq_collection.$fastq_n[$child].'-'.$type_prefix.'genome.fastq', $fq_collection.$fastq_n[$child].'-'.$type_prefix.'TEs.fastq', $fq_collection.$fastq_n[$child].'-'.$type_prefix.'transcripts.fastq'); |
188 my $type_sequence_hashP = get_fastq_seq ( $types[$grand_child] ); | 188 my $type_sequence_hashP = get_fastq_seq ( $types[$grand_child] ); |
189 | 189 |
190 if ( $grand_child == 1 ) | 190 if ( $grand_child == 1 ) |
191 { | 191 { |
192 BWA_call ( $TE, $types[$grand_child], $type_sam_TEs, $misTE, $proc_child, $report ); | 192 BWA_call ( $TE, $types[$grand_child], $type_sam_TEs, $misTE, $proc_child, $report ); |