view scripts/prepare_statistics.sh @ 14:b5b14e3e3c61

toolshed13
author biomonika <biomonika@psu.edu>
date Wed, 10 Sep 2014 11:07:54 -0400
parents 1955f03f092e
children
line wrap: on
line source

#!/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."