Mercurial > repos > biomonika > linkyx
comparison scripts/prepare_statistics.sh @ 9:695d28139f3e
toolshed8
| author | biomonika <biomonika@psu.edu> |
|---|---|
| date | Tue, 09 Sep 2014 14:31:02 -0400 |
| parents | 1955f03f092e |
| children |
comparison
equal
deleted
inserted
replaced
| 8:983278b1fdb2 | 9:695d28139f3e |
|---|---|
| 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 |
