File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -105,24 +105,27 @@ module load R
105
105
FORWARD_COUNT=" ` grep -cE " ${FORWARD_NAMING} " ${SAMPLE_INFO} ` "
106
106
REVERSE_COUNT=" ` grep -cE " ${REVERSE_NAMING} " ${SAMPLE_INFO} ` "
107
107
108
- if [ " $FORWARD_COUNT " = " $REVERSE_COUNT " ]; then
108
+ if [[ " ${FORWARD_COUNT} " -eq " ${REVERSE_COUNT} " ]]
109
+ then
109
110
echo Equal numbers of forward and reverse samples
110
111
else
111
112
exit 1
112
113
fi
113
114
115
+ # Make the out directory
114
116
OUT=${SCRATCH} /${PROJECT} /Quality_Trimming
115
117
mkdir -p ${OUT}
118
+
116
119
# Create arrays of forward and reverse samples
117
120
declare -a FORWARD=(` grep -E " ${FORWARD_NAMING} " " ${SAMPLE_INFO} " ` )
118
121
declare -a REVERSE=(` grep -E " ${REVERSE_NAMING} " " ${SAMPLE_INFO} " ` )
119
122
120
123
# Create an array of sample names
121
- declare -a SAMPLE_NAMES
124
+ declare -a SAMPLE_NAMES=()
122
125
counter=0
123
126
for s in " ${FORWARD[@]} "
124
127
do
125
- SAMPLE_NAMES[` echo " $counter " ` ]=` echo " basename $s ${FORWARD_NAMING} " `
128
+ SAMPLE_NAMES[` echo " $counter " ` ]=" ` basename $s ${FORWARD_NAMING} ` "
126
129
let " counter += 1"
127
130
done
128
131
You can’t perform that action at this time.
0 commit comments