-
Notifications
You must be signed in to change notification settings - Fork 4
/
pgstoolkit.prep.concat_variants.run.sh
18 lines (17 loc) · 1.16 KB
/
pgstoolkit.prep.concat_variants.run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Array job: list variants
STUDYDIR=$1
# 8 bit
echo "variantid alt_ids rsid_aegs chromosome position number_of_alleles first_allele alt_alleles" > ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.8bit.variantlist.txt
for CHR in $(seq 1 22); do
cat ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.8bit.chr${CHR}.variantlist.txt | \
awk '{ print $3":"$4, $1, $2, $3, $4, $5, $6, $7}' | tail -n +2 >> ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.8bit.variantlist.txt
done
gzip -vf ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.8bit.variantlist.txt
# 16 bit
echo "variantid alt_ids rsid_aegs chromosome position number_of_alleles first_allele alt_alleles" > ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.16bit.variantlist.txt
for CHR in $(seq 1 22); do
cat ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.16bit.chr${CHR}.variantlist.txt | \
awk '{ print $3":"$4, $1, $2, $3, $4, $5, $6, $7}' | tail -n +2 >> ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.16bit.variantlist.txt
done
gzip -vf ${STUDYDIR}/aegscombo.topmed_r3_f10_b38.split_norm_af_filter.16bit.variantlist.txt