param: Parameters of the analysis, as set by function 'get_parameters_haystack'
use.advanced.sampling: If NULL naive sampling is used. If a vector is given (of length = no. of cells) sampling is done according to the values in the vector.
Returns
A list with two components, Q for the reference distribution and pseudo.