Unverified Commit fd760622 authored by Christian Erikson's avatar Christian Erikson Committed by GitHub
Browse files

Added ligation regex quote check

Added a check were if ligation is a regex, and unquoted, then add quotes. Removed quotes from count_ligation.sh
parent 72de0431
Loading
Loading
Loading
Loading
+5 −1
Changes for SLURM/scripts/juicer.sh: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -274,6 +274,10 @@ if [ ! -e "${refSeq}.bwt" ]; then
    exit 1;
fi

## Check if ligation is a unquoted regex, if so quote
if [[ -n "$ligation" && $ligation =~ [\(\)\|] && ! $ligation =~ [\"\'] ]];
    export ligation="'$ligation'"

## Set ligation junction based on restriction enzyme
if [ -z "$ligation" ]; then
    case $site in
@@ -611,7 +615,7 @@ SPLITEND`
                $userstring			

		date
		export usegzip=${usegzip}; export name=${name}; export name1=${name1}; export name2=${name2}; export ext=${ext}; export ligation="${ligation}"; ${juiceDir}/scripts/countligations.sh
		export usegzip=${usegzip}; export name=${name}; export name1=${name1}; export name2=${name2}; export ext=${ext}; export ligation=${ligation}; ${juiceDir}/scripts/countligations.sh
		date
CNTLIG`
	dependcount="$jid"