comparison generalized_linear.xml @ 28:63417d0acc72 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 02087ce2966cf8b4aac9197a41171e7f986c11d1-dirty"
author bgruening
date Wed, 02 Oct 2019 03:43:23 -0400
parents 9d3a024cf2da
children a8c7b9fa426c
comparison
equal deleted inserted replaced
27:a9474cdda506 28:63417d0acc72
43 pickle.dump(estimator, out_handler, pickle.HIGHEST_PROTOCOL) 43 pickle.dump(estimator, out_handler, pickle.HIGHEST_PROTOCOL)
44 44
45 #else: 45 #else:
46 with open("$selected_tasks.infile_model", 'rb') as model_handler: 46 with open("$selected_tasks.infile_model", 'rb') as model_handler:
47 classifier_object = load_model(model_handler) 47 classifier_object = load_model(model_handler)
48 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) 48 header = 'infer' if params["selected_tasks"]["header"] else None
49 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=header, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False)
49 prediction = classifier_object.predict(data) 50 prediction = classifier_object.predict(data)
50 prediction_df = pandas.DataFrame(prediction, columns=["predicted"]) 51 prediction_df = pandas.DataFrame(prediction, columns=["predicted"])
51 res = pandas.concat([data, prediction_df], axis=1) 52 res = pandas.concat([data, prediction_df], axis=1)
52 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False, header=None) 53 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False, header=None)
53 #end if 54 #end if