forked from ShockYoung/BestPractice_for_PDMseq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipe_DualRef-S.sh
30 lines (24 loc) · 980 Bytes
/
pipe_DualRef-S.sh
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
#!/bin/bash
#$ -cwd
#$ -S /bin/bash
DIR=/data/project/MouseReadFilter
HumanDIR=$DIR/3.aligned/unfiltered_hg19
MouseDIR=$DIR/3.aligned/unfiltered_mm10
OutputDIR=$DIR/3.aligned/filtered_StrictFiltering
h=$1
m=$2
r=$3
s=$4
samtools view -F 4 $MouseDIR/$h'_'$m'_'$r'_'$s'.bam' | cut -f1 | sort -u > $MouseDIR/'unfiltered_mm10_'$h'_'$m'_'$r'_'$s'_readID.txt'
gatk --java-options "-Xmx8G" FilterSamReads \
--INPUT $HumanDIR/$h'_'$m'_'$r'_'$s'.RGadded.marked.fixed.bam' \
--OUTPUT $OutputDIR/$h'_'$m'_'$r'_'$s'.RGadded.marked.fixed.strictfiltered.bam' \
--READ_LIST_FILE $MouseDIR/'unfiltered_mm10_'$h'_'$m'_'$r'_'$s'_readID.txt' \
--FILTER excludeReadList \
--CREATE_INDEX true
#gatk FilterSamReads \
#--INPUT $HumanDIR/$h'_'$m'_'$r'_'$s'.RGadded.marked.realigned.fixed.bam' \
#--OUTPUT $OutputDIR/$h'_'$m'_'$r'_'$s'.RGadded.marked.realigned.fixed.NM0mm10.bam' \
#--READ_LIST_FILE $MouseDIR/'NM0_'$h'_'$m'_'$r'_'$s'_readID.txt' \
#--FILTER includeReadList \
#--CREATE_INDEX true