Skip to content

Commit 7616d69

Browse files
committed
make temp directory if tmp variable isn't empty
1 parent 57e1bd3 commit 7616d69

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Handlers/Haplotype_Caller.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,15 @@ function Haplotype_Caller_GATK4() {
7070
declare -a sample_array=($(grep -E ".bam" "${sample_list}")) # Turn the list into an array
7171
# Perform the most basic checks
7272
mkdir -p "${out}" # Make sure the out directory exists
73-
73+
# Check if tmp variable is empty, if not empty make directory
74+
if [ -z $test_var ]; then
75+
# tmp variable is empty
76+
echo "Not using temp directory, proceeding..."
77+
else
78+
echo "Making temp directory"
79+
mkdir -p "${tmp}"
80+
fi
81+
7482
# Check if we need to fix quality scores
7583
if [[ ${qscores} == true ]]
7684
then

0 commit comments

Comments
 (0)