You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: launcher_files/launcher_DataCleaningCheck.sh
+9
Original file line number
Diff line number
Diff line change
@@ -262,6 +262,15 @@ if [[ ! -z $BARCODE_FILE ]] ; then
262
262
fi
263
263
fi
264
264
265
+
# UMI
266
+
UMI=$(grep "^UMI:"$CONFIG| sed 's/#.*$//'| cut -d '' -f2 | sed 's/"//g')
267
+
if [[ "$UMI"!="TRUE"&&"$UMI"!="True"&&"$UMI"!="true"&&"$UMI"!="FALSE"&&"$UMI"!="False"&&"$UMI"!="false" ]] ;then
268
+
echo -e "\nERROR: The UMI variable is incorrect in your config file (${CONFIG}). Please set it to TRUE or FALSE."
269
+
echo"As a reminder:"
270
+
echo"UMI: Wether or not UMI sequences should be extracted from reads. Set to TRUE if UMIs were incorporated during library construction. This option is currently only supported for demultiplexed data. [TRUE or FALSE]"
271
+
echo -e "\nExiting.\n"
272
+
exit 1
273
+
fi
265
274
266
275
# TRIMMING_QUAL and TRIMMING_MIN_LENGTH
267
276
TRIMMING_QUAL=$(grep "^TRIMMING_QUAL:"$CONFIG| sed 's/#.*$//'| cut -d '' -f2 | sed 's/"//g')
@@ -158,14 +158,14 @@ if [[ -z "$CREATE_SUB_BAMS" ]] ; then
158
158
echo"CREATE_SUB_BAMS: set to TRUE in case you provided a bed file AND want to extract the reads mapping onto the specified regions, to FALSE otherwise. If set to TRUE, the extracted reads will be stored in new bams, and a new reference (matching the bams) containing only the bed regions will be created."
echo -e "\nERROR: The CREATE_SUB_BAMS variable is incorrect in your config file (${CONFIG}). Please set it to TRUE or FALSE."
163
163
echo"As a reminder:"
164
164
echo"CREATE_SUB_BAMS: set to TRUE in case you provided a bed file AND want to extract the reads mapping onto the specified regions, to FALSE otherwise. If set to TRUE, the extracted reads will be stored in new bams, and a new reference (matching the bams) containing only the bed regions will be created."
165
165
echo -e "\nExiting.\n"
166
166
exit 1
167
167
fi
168
-
if [[ "$CREATE_SUB_BAMS"=="TRUE"||"$CREATE_SUB_BAMS"=="True"||"$CREATE_SUB_BAMS"=="true"||"$CREATE_SUB_BAMS"=="T"]] ;then
168
+
if [[ "$CREATE_SUB_BAMS"=="TRUE"||"$CREATE_SUB_BAMS"=="True"||"$CREATE_SUB_BAMS"=="true" ]] ;then
echo -e "\nERROR: CREATE_SUB_BAM was set to TRUE but neither the bed file nor the parameters to automatically create it were provided in your config file (${CONFIG}). Please either provide a bed file, or values for BED_MIN_MEAN_COV, BED_MIN_DIST and BED_MIN_LENGTH, or set CREATE_SUB_BAM to FALSE."
171
171
echo -e "\nExiting.\n"
@@ -182,6 +182,7 @@ fi
182
182
## Mapping parameters ##
183
183
MAPPER=$(grep "^MAPPER:"$CONFIG| sed 's/#.*$//'| cut -d '' -f2 | sed 's/"//g')
184
184
REMOVE_DUP_MARKDUPLICATES=$(grep "^REMOVE_DUP_MARKDUPLICATES:"$CONFIG| sed 's/#.*$//'| cut -d '' -f2 | sed 's/"//g')
185
+
REMOVE_DUP_UMI=$(grep "^REMOVE_DUP_UMI:"$CONFIG| sed 's/#.*$//'| cut -d '' -f2 | sed 's/"//g')
if [[ "$REMOVE_DUP_MARKDUPLICATES"!="TRUE"&&"$REMOVE_DUP_MARKDUPLICATES"!="True"&&"$REMOVE_DUP_MARKDUPLICATES"!="true"&&"$REMOVE_DUP_MARKDUPLICATES"!="T"&&"$REMOVE_DUP_MARKDUPLICATES"!="FALSE"&&"$REMOVE_DUP_MARKDUPLICATES"!="False"&&"$REMOVE_DUP_MARKDUPLICATES"!="false"&&"$REMOVE_DUP_MARKDUPLICATES"!="F" ]] ;then
204
+
if [[ "$REMOVE_DUP_MARKDUPLICATES"!="TRUE"&&"$REMOVE_DUP_MARKDUPLICATES"!="True"&&"$REMOVE_DUP_MARKDUPLICATES"!="true"&&"$REMOVE_DUP_MARKDUPLICATES"!="FALSE"&&"$REMOVE_DUP_MARKDUPLICATES"!="False"&&"$REMOVE_DUP_MARKDUPLICATES"!="false" ]] ;then
204
205
echo -e "\nERROR: The REMOVE_DUP_MARKDUPLICATES variable is incorrect in your config file (${CONFIG}). Please set it to TRUE or FALSE."
205
206
echo"As a reminder:"
206
-
echo"REMOVE_DUP_MARKDUPLICATES: set to TRUE to remove duplicates after mapping (picard MarkDuplicates -REMOVE_DUPLICATES TRUE), to FALSE otherwise."
207
+
echo"REMOVE_DUP_MARKDUPLICATES: Whether or not to remove duplicates with 'picard MarkDuplicates' after the mapping step. [TRUE or FALSE]"
208
+
echo -e "\nExiting.\n"
209
+
exit 1
210
+
fi
211
+
212
+
213
+
# **REMOVE_DUP_UMI**
214
+
if [[ "$REMOVE_DUP_UMI"!="TRUE"&&"$REMOVE_DUP_UMI"!="True"&&"$REMOVE_DUP_UMI"!="true"&&"$REMOVE_DUP_UMI"!="FALSE"&&"$REMOVE_DUP_UMI"!="False"&&"$REMOVE_DUP_UMI"!="false" ]] ;then
215
+
echo -e "\nERROR: The REMOVE_DUP_UMI variable is incorrect in your config file (${CONFIG}). Please set it to TRUE or FALSE."
216
+
echo"As a reminder:"
217
+
echo"REMOVE_DUP_UMI: Whether or not to remove duplicates with 'umi_tools dedup' after the mapping step. [TRUE or FALSE]"
218
+
echo -e "\nExiting.\n"
219
+
exit 1
220
+
fi
221
+
222
+
if [[ "$REMOVE_DUP_UMI"=="TRUE"||"$REMOVE_DUP_UMI"=="True"||"$REMOVE_DUP_UMI"=="true" ]] && [[ "$REMOVE_DUP_MARKDUPLICATES"=="TRUE"||"$REMOVE_DUP_MARKDUPLICATES"=="True"||"$REMOVE_DUP_MARKDUPLICATES"=="true" ]] ;then
223
+
echo -e "\nERROR: You cannot set both REMOVE_DUP_MARKDUPLICATES and REMOVE_DUP_UMI variable to TRUE in your config file (${CONFIG})."
224
+
echo"As a reminder:"
225
+
echo"REMOVE_DUP_MARKDUPLICATES: Whether or not to remove duplicates with 'picard MarkDuplicates' after the mapping step. If set to TRUE, set REMOVE_DUP_UMI to FALSE. If both REMOVE_DUP_MARKDUPLICATES and REMOVE_DUP_UMI are set to FALSE, duplicates will be marked with 'picard MarkDuplicates'. Setting both REMOVE_DUP_MARKDUPLICATES and REMOVE_DUP_UMI to TRUE will raise an error. [TRUE or FALSE]"
226
+
echo"REMOVE_DUP_UMI: Whether or not to remove duplicates with 'umi_tools dedup' after the mapping step. This option requires prior extraction of UMI sequences from the reads using 'umi_tools extract' (this can be done with the DataCleaning workflow by setting UMI: TRUE). If set to TRUE, set REMOVE_DUP_MARKDUPLICATES to FALSE. If both REMOVE_DUP_UMI and REMOVE_DUP_MARKDUPLICATES are set to FALSE, duplicates will be marked with 'picard MarkDuplicates'. Setting both REMOVE_DUP_MARKDUPLICATES and REMOVE_DUP_UMI to TRUE will raise an error. [TRUE or FALSE]"
0 commit comments