Skip to content

Commit 07f2a8e

Browse files
committed
Minor fixes
1 parent 3bd0eb6 commit 07f2a8e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Quality_Trimming.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,27 @@ module load R
105105
FORWARD_COUNT="`grep -cE "${FORWARD_NAMING}" ${SAMPLE_INFO}`"
106106
REVERSE_COUNT="`grep -cE "${REVERSE_NAMING}" ${SAMPLE_INFO}`"
107107

108-
if [ "$FORWARD_COUNT" = "$REVERSE_COUNT" ]; then
108+
if [[ "${FORWARD_COUNT}" -eq "${REVERSE_COUNT}" ]]
109+
then
109110
echo Equal numbers of forward and reverse samples
110111
else
111112
exit 1
112113
fi
113114

115+
# Make the out directory
114116
OUT=${SCRATCH}/${PROJECT}/Quality_Trimming
115117
mkdir -p ${OUT}
118+
116119
# Create arrays of forward and reverse samples
117120
declare -a FORWARD=(`grep -E "${FORWARD_NAMING}" "${SAMPLE_INFO}"`)
118121
declare -a REVERSE=(`grep -E "${REVERSE_NAMING}" "${SAMPLE_INFO}"`)
119122

120123
# Create an array of sample names
121-
declare -a SAMPLE_NAMES
124+
declare -a SAMPLE_NAMES=()
122125
counter=0
123126
for s in "${FORWARD[@]}"
124127
do
125-
SAMPLE_NAMES[`echo "$counter"`]=`echo "basename $s ${FORWARD_NAMING}"`
128+
SAMPLE_NAMES[`echo "$counter"`]="`basename $s ${FORWARD_NAMING}`"
126129
let "counter += 1"
127130
done
128131

0 commit comments

Comments
 (0)