-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphla
More file actions
46 lines (36 loc) · 1.43 KB
/
Copy pathphla
File metadata and controls
46 lines (36 loc) · 1.43 KB
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
42
43
44
45
46
#!/bin/bash
# THREADED HLA typing off 10x assemblies
#inputs are a file that has the HLA region extracted from the megabubbles file
#(ie 'hla.bubbles.fasta'), hla/mhc reference region, the HLA alleles query against the megabubbles, a name for your run, and
#the number of threads to us with pblat
## please use full paths!
#help output
if [ "$1" == "-h" ]; then
echo "PLEASE USE ABSOLUTE PATHS!"
echo "Usage: `basename $0` [1)hla.bubbles.fa 2)hla.genome.ref.fa 3)alleles-to-query.fa 4)name-of-run 5)number-of-threads]"
exit 0
fi
#make sure there is an inputfile
if [ $# -eq 0 ]
then
echo "No arguments supplied"
echo "Use -h for info"
exit 1
fi
echo "------PERFORMING NUCMER AND MAKING MUMMER PLOT------"
# run nucmer and make the mummer plot to look at phasing across the HLA region
mkdir nucmer
cd nucmer
#nucmer -c 1000 -l 20 $1 $2
nucmer -l 40 -c 150 $1 $2
mummerplot -s large -l -t png -p $4 out.delta
gnuplot $4.gp
show-coords -c out.delta > out.coords
Rscript -e 'source("/mnt/home/stephen/Apps/bin/dotplot.R")'
cd ../
echo "------PERFORMING HLA TYPING------"
pblat -noHead -stepSize=2 $1 $3 -dots=100 -threads=$5 -out=psl $4.nuc.psl
perl /mnt/home/stephen/Apps/bin/pslScore.pl $4.nuc.psl > $4.nuc.scores.out
paste $4.nuc.psl $4.nuc.scores.out > $4.nuc.pls.scores.out
cut -f -17,26- $4.nuc.pls.scores.out | cat /mnt/home/stephen/Apps/bin/Headers/blat.short.header.tabs - > $4.nuc.pls.scores.final.out
echo "-----DONE-----"