-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDNAnexus.sh
64 lines (51 loc) · 1.61 KB
/
DNAnexus.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
51
52
53
54
55
56
57
58
59
60
61
62
63
#!usr/bin/bash
unset array
counter=0
declare -a array
for i in Fiber-iPOP-4_concatenated/*R1_concatenated.fastq.gz
do
echo $i
#cutting barcode info from file name
barcode_temp=$(echo $i | head -c -26)
echo $barcode_temp
barcode=$(echo $barcode_temp | tail -c -17)
echo $barcode
#building array and counting
array[counter]=$barcode
counter=$((counter+1))
echo $counter
done
echo ${array[*]}
echo ${#array[@]}
source dx-toolkit/environment
for i in ${array[*]}
do
dx describe "Fiber-iPOP-4_concatenated/"${i}"_R1_concatenated.fastq.gz"
yes | dx run workflows/EncodePipelineiPOP4 -i0.reads1="Fiber-iPOP-4_concatenated/"${i}"_R1_concatenated.fastq.gz" -i0.reads2="Fiber-iPOP-4_concatenated/"${i}"_R2_concatenated.fastq.gz"
done
#Saving code potentially for later
#printf "Fiber-iPOP_concatenated/"${i}"_R1_concatenated.fastq.gz\nFiber-iPOP_concatenated/"${i}"_R2_concatenated.fastq.gz\n\nY\n" | dx run workflows/EncodePipelineiPOP3
unset array
counter=0
declare -a array
for i in Fiber-iPOP-3_concatenated/*R1_concatenated.fastq.gz
do
echo $i
#cutting barcode info from file name
barcode_temp=$(echo $i | head -c -26)
echo $barcode_temp
barcode=$(echo $barcode_temp | tail -c -17)
echo $barcode
#building array and counting
array[counter]=$barcode
counter=$((counter+1))
echo $counter
done
echo ${array[*]}
echo ${#array[@]}
source dx-toolkit/environment
for i in ${array[*]}
do
dx describe "Fiber-iPOP-3_concatenated/"${i}"_R1_concatenated.fastq.gz"
yes | dx run workflows/EncodePipelineiPOP3 -i0.reads1="Fiber-iPOP-3_concatenated/"${i}"_R1_concatenated.fastq.gz" -i0.reads2="Fiber-iPOP-3_concatenated/"${i}"_R2_concatenated.fastq.gz"
done