# table and fetches the appropriate subsequence. the operators
# join(), complement(), and order() are handled.
# the locator string is broken into a comma separated lists, and
- # modified if the params donnot balance. otherwise the comma separated
+ # modified if the parens donnot balance. otherwise the comma separated
# list of ranges are stripped from operators, and the subsequence are
# fetched and handled according to the operators.
# SNP locators are also dealt with (single positions).
def parse_locator(locator, join = nil, comp = nil, order = nil)
intervals = locator.split(",")
- unless balance_params?(intervals.first) # locator includes a join/comp/order of several ranges
+ unless balance_parens?(intervals.first) # locator includes a join/comp/order of several ranges
case locator
when /^join\((.*)\)$/
locator = $1
return @subseq
end
- def balance_params?(locator)
+ def balance_parens?(locator)
parens = 0
locator.each_char do |char|