-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands_used.txt
39 lines (31 loc) · 2.26 KB
/
commands_used.txt
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
# for extracting EUR and non-FIN Eur from the 1k dataset
grep -vw FIN data/1k_all.panel > data/nonFIN.samples.list
grep EUR data/nonFIN.samples.list | cut -f1 > data/nonFIN.samples.list2
rm data/nonFIN.samples.list
mv data/nonFIN.samples.list2 data/nonFIN.samples.list
grep FIN data/1k_all.panel | cut -f1 > data/FIN.samples.list
grep EUR data/1k_all.panel | cut -f1 > EUR.samples.list
# following http://www.internationalgenome.org/faq/how-can-i-get-allele-frequency-my-variant/
vcf-subset -c EUR.samples.list data/1k_phase3_chr22.vcf.gz | fill-an-ac | bgzip -c > data/EUR.chr22.phase3.vcf.gz
# bcftools
bcftools call -c data/1k_phase3_chr22.vcf.gz
bcftools stats -r data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz
bcftools stats data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz > bcftools-output/1k_stats_all
bcftools stats --af-bins af-bins data/gz/gnomad.genomes.r2.0.1.sites.22.vcf.gz > bcftools-output/gnomad_stats_af-bins
bcftools stats --threads 4 --af-bins af-bins data/gz/gnomad.genomes.r2.0.1.sites.22.vcf.gz > bcftools-output/gnomad_stats_af-bins
bcftools stats data/gz/gnomad.genomes.r2.0.1.sites.22.vcf.gz > bcftools-output/stats_all
# intersection
bcftools index data/gnomad_chr22.vcf.gz
bcftools index data/EUR.chr22.phase3.vcf.gz
bcftools isec data/EUR.chr22.phase3.vcf.gz data/gnomad_chr22.vcf.gz -p data/isec_EUR_Gnomad
bcftools index data/nonFIN.chr22.phase3.vcf.gz --threads 4
bcftools isec --threads 4 data/nonFIN.chr22.phase3.vcf.gz data/gnomad_chr22.vcf.gz -p data/isec_nonFIN_Gnomad
# plot
plot-vcfstats bcftools-output/1k_stats_all -p bcftools-output/1k_plot/
# vcftools
vcftools --counts --gzvcf ../data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz
vcftools --gzvcf data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz --FILTER-summary
vcftools --gzvcf data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz --TsTv-summary
vcftools --gzvcf data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz --snps
vcftools --gzvcf data/gz/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz --keep-only-indels
vcftools --gzvcf data/isec_EUR_Gnomad/0002.vcf --hwe 0.05