forked from MRCIEU/godmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
16d-flipcheck.sh
executable file
·32 lines (22 loc) · 1 KB
/
16d-flipcheck.sh
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
#!/bin/bash
set -e
source ./config
if [ -f "processed_data/genetic_data/data.easyqc.flipped.SNPs.txt" ]; then
echo "easy qc flipped snps file present"
else
echo "Problem: easy qc flipped snps file is absent"
exit 1
fi
nsnps=`wc -l processed_data/genetic_data/data.easyqc.flipped.SNPs.txt |awk '{print $1}'`
echo $nsnps present in processed_data/genetic_data/data.easyqc.flipped.SNPs.txt
if [ "$nsnps" -gt "0" ]; then
echo "easy qc flipped snps file is not empty"
else
echo "easy qc flipped snps file is empty"
exit 1
fi
cp processed_data/genetic_data/data.easyqc.flipped.SNPs.txt processed_data/genetic_data/${study_name}_data.easyqc.flipped.SNPs.txt
echo ""
sftp ${sftp_username}@${sftp_address}:${sftp_path}/${sftp_username} <<EOF
put processed_data/genetic_data/${study_name}_data.easyqc.flipped.SNPs.txt
EOF