Repository 'pirna_pipeline'
hg clone https://toolshed.g2.bx.psu.edu/repos/romaingred/pirna_pipeline

Changeset 43:0be8011b3d98 (2017-12-01)
Previous changeset 42:cb33c7d521c4 (2017-12-01) Next changeset 44:bd4b30bff219 (2017-12-01)
Commit message:
Uploaded
modified:
bin/piPipe.pl
b
diff -r cb33c7d521c4 -r 0be8011b3d98 bin/piPipe.pl
--- a/bin/piPipe.pl Fri Dec 01 05:35:14 2017 -0500
+++ b/bin/piPipe.pl Fri Dec 01 08:01:45 2017 -0500
[
@@ -107,7 +107,7 @@
 
  $pm->start($fastq[$child]) and next;
 
- my $dir_fq = $dir.$name.'/';
+ my $dir_fq = $dir.$fastq_n[$child].'/';
  mkdir $dir_fq;
 
  my $gen_dir = $dir_fq.'genome/';
@@ -119,12 +119,12 @@
  my $fastq_resized = $dir_fq.$name.'_'.$min.'-'.$max.'.fastq';
  size_distribution (  $fastq[$child], $fastq_resized, $size_dir, $min, $max );
 
- my $sam_genome = $gen_dir.$name.'_'.$min.'-'.$max.'_'.$ref_name.'.sam';
- my $sam_genome_unique = $gen_dir.$name.'_'.$min.'-'.$max.'_'.$ref_name.'_unique.sam';
- my $fastq_prefix = $gen_dir.$name.'_'.$min.'-'.$max.'_'.$ref_name;
+ my $sam_genome = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max.'_'.$ref_name.'.sam';
+ my $sam_genome_unique = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max.'_'.$ref_name.'_unique.sam';
+ my $fastq_prefix = $gen_dir.$fastq_n[$child].'_'.$min.'-'.$max;
 
  BWA_call ( $ref, $fastq_resized, $sam_genome, $mis, $proc_child, $report );
- my ( $fai_ref_hashP, $ma, $ma_uni ) = get_unique ( $sam_genome, $sam_genome_unique, $gen_dir, 1, $report );
+ my ( $fai_ref_hashP, $ma, $ma_uni ) = get_unique ( $sam_genome, $sam_genome_unique, $gen_dir, $fq_collection.$fastq_n[$child], 1, $report );
 
  my $scale = 1000000 / $ma;
  sam_to_bam_bg ( $sam_genome_unique, $scale, $proc_child );
@@ -148,8 +148,8 @@
  bg_to_png ( $fai_file, $fastq_prefix.'_plus.bedgraph', $fastq_prefix.'_minus.bedgraph', $Gviz_dir_rand, 'Mb' );
 
  my $group_dir = $dir_fq.'subgroups/';
- my $fastq_uni = $gen_dir.'unique.fastq';
- my $fastq_all = $gen_dir.'all.fastq';
+ my $fastq_uni = $fq_collection.$fastq_n[$child].'unique_mappers.fastq';
+ my $fastq_all = $fq_collection.$fastq_n[$child].'all_mappers.fastq';
  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);
 
  pie_chart($group_dir);
@@ -183,8 +183,8 @@
  $pm2->start($types[$grand_child]) and next;
  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' );
  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' );
- my ( $type_uni_genome_fastq, $type_uni_TEs_fastq,  $type_uni_transcripts_fastq ) = ( $fq_collection.$type_prefix.'genome_uni.fastq', $fq_collection.$type_prefix.'TEs_uni.fastq', $fq_collection.$type_prefix.'transcripts_uni.fastq');
- my ( $type_genome_fastq, $type_TEs_fastq,  $type_transcripts_fastq ) = ( $fq_collection.$type_prefix.'genome.fastq', $fq_collection.$type_prefix.'TEs.fastq', $fq_collection.$type_prefix.'transcripts.fastq');
+ 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');
+ 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');
  my $type_sequence_hashP = get_fastq_seq ( $types[$grand_child] );
 
  if ( $grand_child == 1 )