set-ue
## INPUTBATCH=$1# e.g. 1, 2, ..., 10REF_FOLDER=$2# e.g. /path/to/reference_panel_folderOUT_DIR=$3# e.g. /path/to/output_directorySAMPLE_LIST=$4# e.g. /path/to/sample_list.txtMAP_DIR=$5# e.g. /path/to/map_directorygen_ref_batch_chr(){chr=$1in_dir=$2out_dir=$3sample_list=$4map_dir=$5mkdir-p$out_direchofilteringreferenceof${chr}bcftoolsview\-S^$sample_list${in_dir}/chr${i}.vcf.gz\-Oz-o${out_dir}/chr${i}.vcf.gz
bcftoolsindex-f${out_dir}/chr${i}.vcf.gz
bashbuid_ref.sh${out_dir}/chr${i}.vcf.gz${chr}${map_dir}/${chr}.b38.gmap.gz${out_dir}}foriin{1..22}dogen_ref_batch_chrchr${i}$REF_FOLDER$OUT_DIR$SAMPLE_LIST$MAP_DIR&donewait
build_ref.sh splices raw reference panels (VCF files) to prepare the imputation panel for the GLIMPSE2 imputation process (bin files).
set-ue
## INPUTCHR=$1# e.g. 1, 2, ..., 22OUT=$2# e.g. chr1_10x_lps_imputed.vcf.gzCORES="${3:-1}"# number of cores to use, default is 1REF_FOLDER=${4}# e.g. /path/to/reference_panel_folderls*${COV}_lps.bam>run_bam_list.txt
run_imputation_bam_list.shrun_bam_list.txt\chr${CHR}\${OUT}\${CORES}\${REF_FOLDER}\