-
Notifications
You must be signed in to change notification settings - Fork 1
/
MF4.Postprocessing
45 lines (40 loc) · 2.62 KB
/
MF4.Postprocessing
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
#Usage commands:
#bash $HOME/2021/MosaicForecast/MF_Postprocessing -s /hpcfs/users/a1742674/2021/SSC/Batch06/ID.Batch06.txt -d $HOME/2021/SSC_Outputs/Batch_06/MosaicForecast
#bash $HOME/2021/MosaicForecast/MF_Postprocessing -s /hpcfs/users/a1742674/2021/SSC/Batch04/familybatch4.txt -d $HOME/2021/SSC_Outputs/Batch_04/MosaicForecast
#bash $HOME/2021/MosaicForecast/MF_Postprocessing -s /hpcfs/users/a1742674/2021/SSC/Batch05/ID.Batch05part2.txt -d $HOME/2021/SSC_Outputs/Batch_05/MosaicForecast
#bash $HOME/Scripts/MF4.Postprocessing -s $HOME/CP/MissingMF2 -d $HOME/CP/MosaicForecast
#bash $HOME/Scripts/MF4.Postprocessing -s $HOME/CP/MissingpGoM2.txt -d $HOME/CP/MosaicForecast
#bash $HOME/Scripts/MF4.Postprocessing -s $HOME/2021/SSC_Outputs/ProSib/MosaicForecast/ID.MF.txt -d $HOME/2021/SSC_Outputs/ProSib/MosaicForecast
## Set Variables ##
while [ "$1" != "" ]; do
case $1 in
-s ) shift
sample=$1
;;
-d ) shift
DIR=$1
;;
* ) usage
exit 1
esac
shift
done
##This is for parents of SSC
#cat $sample | { cat ; echo ; } | while read -r ID; do
#parents=mo
#awk '$35=="mosaic" {OFS="\t"; print}' $DIR/$ID.$parents.genotype.predictions.phased.singlemode.bed > $DIR/$ID.$parents.RefinedMosaicOnly.txt
#awk '$25>=20 {OFS="\t"; print}' $DIR/$ID.$parents.RefinedMosaicOnly.txt > $DIR/$ID.$parents.Refined.dp20.MosaicOnly.txt
#awk '$24>=0.03 {OFS="\t"; print}' $DIR/$ID.$parents.Refined.dp20.MosaicOnly.txt > $DIR/$ID.$parents.Refined.dpaf.MosaicOnly.txt
#done
#cat $sample | { cat ; echo ; } | while read -r ID; do
#parents=fa
#awk '$35=="mosaic" {OFS="\t"; print}' $DIR/$ID.$parents.genotype.predictions.phased.singlemode.bed > $DIR/$ID.$parents.RefinedMosaicOnly.txt
#awk '$25>=20 {OFS="\t"; print}' $DIR/$ID.$parents.RefinedMosaicOnly.txt > $DIR/$ID.$parents.Refined.dp20.MosaicOnly.txt
#awk '$24>=0.03 {OFS="\t"; print}' $DIR/$ID.$parents.Refined.dp20.MosaicOnly.txt > $DIR/$ID.$parents.Refined.dpaf.MosaicOnly.txt
#done
##This is for CP cohort
cat $sample | { cat ; echo ; } | while read -r ID; do
awk '$35=="mosaic" {OFS="\t"; print}' $DIR/$ID.genotype.predictions.phased.singlemode.bed > $DIR/$ID.RefinedMosaicOnly.txt
awk '$25>=20 {OFS="\t"; print}' $DIR/$ID.RefinedMosaicOnly.txt > $DIR/$ID.Refined.dp20.MosaicOnly.txt
awk '$24>=0.03 {OFS="\t"; print}' $DIR/$ID.Refined.dp20.MosaicOnly.txt > $DIR/$ID.Refined.dpaf.MosaicOnly.txt
done