-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPahangi_FASTQ_Combine.sh
50 lines (40 loc) · 1.66 KB
/
Pahangi_FASTQ_Combine.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
for ((var=1; var<=$#; var++))
do
if [[ "${!var}" = "-SRA1" ]]
then
var=$(($var+1))
SRA1=${!var}
echo "Variable SRA1 is "$SRA1
elif [[ "${!var}" = "-SRA2" ]]
then
var=$(($var+1))
SRA2=${!var}
echo "Variable SRA2 is "$SRA2
elif [[ "${!var}" = "-Sample" ]]
then
var=$(($var+1))
Sample=${!var}
echo "Variable Sample is "$Sample
else
echo "Unrecognized input, exitting"
exit 1
fi
done
if [[ $SRA2 = "none" ]]
then
output=$(echo $Sample"_1.fastq.gz")
fastq1=$(echo $SRA1"_1.fastq.gz")
cp /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq1 /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_Final_FASTQ/$output
output=$(echo $Sample"_2.fastq.gz")
fastq1=$(echo $SRA1"_2.fastq.gz")
cp /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq1 /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_Final_FASTQ/$output
else
output=$(echo $Sample"_1.fastq.gz")
fastq1=$(echo $SRA1"_1.fastq.gz")
fastq2=$(echo $SRA2"_1.fastq.gz")
cat /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq1 /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq2 > /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_Final_FASTQ/$output
output=$(echo $Sample"_2.fastq.gz")
fastq1=$(echo $SRA1"_2.fastq.gz")
fastq2=$(echo $SRA2"_2.fastq.gz")
cat /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq1 /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_FASTQ/$fastq2 > /local/projects-t3/EBMAL/SNP_MALE_GATK_Best_Practices/Brugia_Pahangi_Final_FASTQ/$output
fi