Fixed parsing function for sample imputation

Enhanced the parsing function for imputation methods.

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>