Not sure how this stayed in for so long, but it's not a valid
comparison... If getopts fails to retrieve an argument for the
max_mapped_reads parameter, -n, then it will unset OPTARG, and
therefore max_mapped_reads remains unset. Testing an unset variable in
quotes with -n will return FALSE, whereas testing inequality to the
string "null" will throw an error about != not being a unary operator.
Not sure how this stayed in for so long, but it's not a valid comparison... If getopts fails to retrieve an argument for the max_mapped_reads parameter, -n, then it will unset OPTARG, and therefore max_mapped_reads remains unset. Testing an unset variable in quotes with -n will return FALSE, whereas testing inequality to the string "null" will throw an error about != not being a unary operator.
Thanks to Jason Bosch for catching this bug.