Unverified Commit 063d0465 authored by Aiden Lab's avatar Aiden Lab Committed by GitHub
Browse files

Update juicer.sh

parent 099b50a4
Loading
Loading
Loading
Loading
+18 −16
Original line number Diff line number Diff line
@@ -238,7 +238,8 @@ fastqdir=${topDir}"/fastq/*_R*.fastq*"
outputdir=${topDir}"/aligned"
tmpdir=${topDir}"/HIC_tmp"

## Check that fastq directory exists and has proper fastq files
## Check that fastq directory exists and has proper fastq files; only if necessary
if [[ -z "$final" && -z "$dedup" && -z "$postproc" && -z "$deduponly" && -z "$merge" && -z "$mergeonly" ]]; then
    if [ ! -d "$topDir/fastq" ]; then
        echo "Directory \"$topDir/fastq\" does not exist."
    	echo "Create \"$topDir/fastq\" and put fastq files to be aligned there."
@@ -256,6 +257,7 @@ else
	    fi
	fi
    fi
fi

## Create output directory, only if not in dedup, final, or postproc stages
if [[ -d "$outputdir" && -z "$final" && -z "$dedup" && -z "$postproc" && -z "$deduponly" ]] 
@@ -264,7 +266,7 @@ then
    echo "***! Type \"juicer.sh -h \" for help"
    exit 1			
else
    if [[ -z "$final" && -z "$dedup" && -z "$postproc" && -z "$deduponly" ]]; then
    if [[ -z "$final" && -z "$dedup" && -z "$postproc" && -z "$deduponly" && -z "$alignonly" ]]; then
        mkdir "$outputdir" || { echo "***! Unable to create ${outputdir}, check permissions." ; exit 1; } 
    fi
fi