File: run_histo.sh

package info (click to toggle)
lumpy-sv 0.3.1%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 296,072 kB
  • sloc: cpp: 9,908; python: 1,768; sh: 1,384; makefile: 365; ansic: 322; perl: 58
file content (41 lines) | stat: -rwxr-xr-x 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash

#  run_histo.sh
#  (c) 2012 - Ryan M. Layer
#  Hall Laboratory
#  Quinlan Laboratory
#  Department of Computer Science
#  Department of Biochemistry and Molecular Genetics
#  Department of Public Health Sciences and Center for Public Health Genomics,
#  University of Virginia
#  rl6sf@virginia.edu
# 
# Licenced under the GNU General Public License 2.0 license.



if [ -z $4 ]
then
	echo "usage:$0 <bam file> <out file> <Z> <read lengh>"
	exit
fi

INF=$1
OUTF=$2
CZ=$3
RL=$4

SCRIPT_DIR=`dirname $0`

OUT=`samtools view $INF\
	| $SCRIPT_DIR/pairend_distro.pl \
	-rl 150 \
	-X $CZ \
	-N 100000 \
	-o $OUTF`

MEAN=`echo $OUT | cut -d" " -f1 | cut -d":" -f2`
STDEV=`echo $OUT | cut -d" " -f2 | cut -d":" -f2`

echo $MEAN
echo $STDEV