-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal_ancestry.sh
More file actions
45 lines (31 loc) · 1.09 KB
/
local_ancestry.sh
File metadata and controls
45 lines (31 loc) · 1.09 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
#!/bin/bash
#SBATCH -p highmem
#SBATCH -c 32
#SBATCH --mem=400G
#SBATCH --job-name local_ancestry
if [ ! -f $1 ];
then
echo "$1 file does not exist"
exit 1
fi
# make job tmp dir and clean up on exit
export TMPDIR=/cluster/home/jtaylor/scratch/tmp
export TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
module load bcftools
chr=$(sed -n ${SLURM_ARRAY_TASK_ID}p $1)
echo ${chr}
input_basename=$2
ligation_dir=$(realpath phasing/ligation)
mkdir -p local_ancestry
cd local_ancestry
source /cluster/home/jtaylor/micromamba/etc/profile.d/micromamba.sh
micromamba activate /cluster/home/jtaylor/micromamba/envs/rfmix2
rfmix \
-f ${ligation_dir}/${input_basename}_${chr}.phased.vcf.gz \
-r /cluster/home/jtaylor/reference_files/1000G_hg38/ALL.${chr}.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz \
-m /cluster/home/jtaylor/scripts/Run_Tractor/resources/1000G_superpop_labels_amr_eur_afr.tsv \
-g /cluster/home/jtaylor/scripts/Run_Tractor/resources/${chr}.hg38.gmap.txt \
-o ${input_basename}_${chr}.deconvoluted \
--chromosome=${chr} \
--n-threads=${SLURM_JOB_CPUS_PER_NODE}