diff scripts/prepare_statistics.sh @ 9:695d28139f3e

toolshed8
author biomonika <biomonika@psu.edu>
date Tue, 09 Sep 2014 14:31:02 -0400
parents 1955f03f092e
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/prepare_statistics.sh	Tue Sep 09 14:31:02 2014 -0400
@@ -0,0 +1,26 @@
+#!/bin/bash
+set -e;
+
+#variables
+mkdir -p scripts/statistics; #create directory if it doesn't exist
+
+echo "Calculation of statistics started."
+
+#get statistics about mapped and unmapped reads for every contig
+
+	idxstats_bam_file () 
+	{
+	  for ARG in "$@";
+	    do
+	      samtools idxstats bam/aln_cleaned_sorted_deduplicated_${ARG}_male.bam >scripts/statistics/stat_${ARG} &
+	    done;
+	}
+
+	idxstats_bam_file mother father daughter son;
+
+wait;
+echo "Idxstats successfully created."
+
+
+
+