Skip to content

Commit 74f5f32

Browse files
committed
chore: gracefully detect empty sample set
1 parent 741db84 commit 74f5f32

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

dx_app/src/t-SNE.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,13 @@ main() {
289289
fi
290290
done
291291

292-
# Turn the metadata entries into and array, then nest everything under the "properties" key
292+
if [ ! -e "tmp_metadata.json" ]
293+
then
294+
echo "{\"error\": {\"type\": \"AppError\", \"message\": \"No reference samples passed filtering criteria.\"}}" > job_error.json
295+
exit 1
296+
fi
297+
298+
# Turn the metadata entries into an array, then nest everything under the "properties" key
293299
jq --slurp "flatten" tmp_metadata.json | jq '[.[] | {"properties": .}]' > filtered_metadata.json
294300

295301
# Handle Dana Farber PDX samples

0 commit comments

Comments
 (0)