Adding files for gathering gvcfs and cleaning gvcfs
[arvados-tutorial.git] / src / variantcalling / checksex.sh
1 #!/bin/bash
2
3 xcov=$(echo "scale=4; $(samtools idxstats $1 | grep 'chrX[^_]' | cut -f 3)/$(samtools idxstats $1 | grep 'chrX[^_]' | cut -f 2)" | bc)
4 echo $xcov
5 ycov=$(echo "scale=4; $(samtools idxstats $1 | grep "chrY[^_]" | cut -f 3)/$(samtools idxstats $1 | grep "chrY[^_]" | cut -f 2)" | bc)
6 echo $ycov
7
8 rat=$(echo "scale=4; ${xcov}/${ycov}" | bc)
9
10 echo $rat