added analysis hash and fixed study/assay initialization conditions