calculate_intensity.R: added some code to parse regions with a lapply

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>