Line 1: The variable ref is assigned the first argument to the script
Line 2: The variable read1 is assigned the second one
Line 3: In ref, everything up to the first '/' character is removed. For example, if ref was "one/two/three", it is now "two/three"
Line 4: In read1, two groups of '_' followed by a arbitrary number of non-underscore-characters is elimited at the end of the string. For example if read1 was "one_two_three_four" it is now "one_two".