|
0
|
1 #!/bin/bash
|
|
|
2 set -e;
|
|
|
3
|
|
|
4 #variables
|
|
|
5 mkdir -p scripts/statistics; #create directory if it doesn't exist
|
|
|
6
|
|
|
7 echo "Calculation of statistics started."
|
|
|
8
|
|
|
9 #get statistics about mapped and unmapped reads for every contig
|
|
|
10
|
|
|
11 idxstats_bam_file ()
|
|
|
12 {
|
|
|
13 for ARG in "$@";
|
|
|
14 do
|
|
|
15 samtools idxstats bam/aln_cleaned_sorted_deduplicated_${ARG}_male.bam >scripts/statistics/stat_${ARG} &
|
|
|
16 done;
|
|
|
17 }
|
|
|
18
|
|
|
19 idxstats_bam_file mother father daughter son;
|
|
|
20
|
|
|
21 wait;
|
|
|
22 echo "Idxstats successfully created."
|
|
|
23
|
|
|
24
|
|
|
25
|
|
|
26
|