Added haplosim.r function. Fixed bug in analysis where transposed matrix provided to haplosim function