-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_process_documentation.txt
More file actions
66 lines (41 loc) · 1.96 KB
/
data_process_documentation.txt
File metadata and controls
66 lines (41 loc) · 1.96 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# check num of individuals
plink --bfile v40.3.BA --freq --out tmp/freq_BA
grep "people" freq_BA.log # should give 177
#check average missing data per site
plink --bfile v51.0.H --missing --out tmp/missing_data_H
awk 'NR > 1 { total += $5; count++ } END { print total/count }' tmp/missing_data_H.lmiss
#convert to vcf
plink --bfile v51.0.H --recode vcf --out tmp/data_H.vcf
#extract chrom 2 from epoch H
plink --bfile v51.0.H --chr 2 --make-bed --out ../Chr2_H/v51.0.H.chr2
#convert to vcf in /u/project/ngarud/Garud_lab/aDNA/Chr2_H
plink --bfile v51.0.H.chr2 --recode vcf --out VCF.v51.0.H.chr2
## do this for all chromsomes
for chr in {1..22}; do
#extract chrom
plink --bfile ../DANN_DATA/v40.3.M --chr $chr --make-bed --out v40.3.M.chr$chr
#convert to vcf
plink --bfile v40.3.M.chr$chr --recode vcf --out VCF.v40.3.M.chr$chr
rm v40.3.M.chr$chr*
rm *log
done
for chr in {1..22}; do
#extract chrom
plink --bfile DANN_DATA/YRI/v40.3.YRI --chr $chr --make-bed --out v40.3.YRI.chr$chr
#convert to vcf
plink --bfile v40.3.YRI.chr$chr --recode vcf --out YRI/VCF.v40.3.YRI.chr$chr
rm -f v40.3.YRI.chr$chr*
rm -f *log
done
#extract region that includes LCT
plink --bfile v51.0.H --chr 2 --from-bp 135408034 --to-bp 136308034 --make-bed --out ../Chr2_H/v51.0.H.chr2.LCT
#convert to vcf in /u/project/ngarud/Garud_lab/aDNA/Chr2_H
plink --bfile v51.0.H.chr2.LCT --recode vcf --out VCF.v51.0.H.chr2.LCT
# HLA region IA
plink --bfile v51.0.IA --chr 6 --from-bp 28138809 --to-bp 28910235 --make-bed --out ../Chr6_IA/v51.0.IA.chr6.HLA
#convert to vcf in /u/project/ngarud/Garud_lab/aDNA/Chr2_H
plink --bfile v51.0.IA.chr6.HLA --recode vcf --out VCF.v51.0.IA.chr6.HLA
#extract random region chrom2
plink --bfile v51.0.H --chr 2 --from-bp 203169 --to-bp 1103169 --make-bed --out ../Chr2_H/v51.0.H.chr2.region
#convert to vcf in /u/project/ngarud/Garud_lab/aDNA/Chr2_H
plink --bfile v51.0.H.chr2.region --recode vcf --out VCF.v51.0.H.chr2.region