Download reference/scripts/vcf_probe2.sh from Larrivhan/NeCast-1000G: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/datasets/Larrivhan/NeCast-1000G/resolve/main/reference/scripts/vcf_probe2.sh
- Command line
-
hf download hf://datasets/Larrivhan/NeCast-1000G/reference/scripts/vcf_probe2.sh
-
curl -L -o vcf_probe2.sh https://huggingface.co/datasets/Larrivhan/NeCast-1000G/resolve/main/reference/scripts/vcf_probe2.sh
1.21 kB
| set -uo pipefail | |
| module load bcftools/1.16 >/dev/null 2>&1 | |
| R=/ibex/project/c2041/hany0c/bench_h2h_20260915/real | |
| V=$R/raw/1kGP_high_coverage_Illumina.chr2.filtered.SNV_INDEL_SV_phased_panel.vcf.gz | |
| echo "start $(date -u +%FT%TZ) host $(hostname)" | |
| bcftools query -f "%POS\t%FILTER\t%TYPE\t%REF\t%ALT\t%INFO/AC\n" $V 2> $R/logs/vcf_probe2.stderr | awk -F"\t" " | |
| {n++; filt[\$2]++; typ[\$3]++; if(n==1||\$1<lo)lo=\$1; if(\$1>hi)hi=\$1; | |
| snv1=(\$4 ~ /^[ACGT]\$/ && \$5 ~ /^[ACGT]\$/); | |
| if(\$4 ~ /^[ACGT]\$/ && \$5 ~ /^[ACGT](,[ACGT])+\$/) multi++; | |
| if(snv1){bs++; if(\$6==1)ac1++; if(\$6==2)ac2++; if(mn==\"\"||\$6+0<mn)mn=\$6+0; pc[\$1]++} | |
| if(\$4 ~ /^[ACGT]\$/ && \$5 ~ /^[ACGT]/ && \$5 !~ /[^ACGT,]/) snpany[\$1]++} | |
| END{print \"records\",n,\"pos_range\",lo,hi; for(k in filt)print \"FILTER\",k,filt[k]; for(k in typ)print \"TYPE\",k,typ[k]; | |
| print \"biallelic_snv\",bs,\"multiallelic_snv_records\",multi+0,\"AC_min\",mn,\"AC==1\",ac1+0,\"AC==2\",ac2+0; | |
| d=0; dr=0; for(p in pc) if(pc[p]>1){d++; dr+=pc[p]}; print \"positions with >1 biallelic SNV record\",d,\"records\",dr; | |
| e=0; for(p in snpany) if(snpany[p]>1)e++; print \"positions with >1 SNV record (incl multiallelic)\",e}" | |
| echo "end $(date -u +%FT%TZ)" | |