Mercurial > repos > bgruening > sklearn_discriminant_classifier
comparison discriminant.xml @ 31:64b771b1471a draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 05:17:00 -0500 |
parents | 9bb505eafac9 |
children | eeaf989f1024 |
comparison
equal
deleted
inserted
replaced
30:18b39ada6f35 | 31:64b771b1471a |
---|---|
33 | 33 |
34 with open("$infile_model", 'rb') as model_handler: | 34 with open("$infile_model", 'rb') as model_handler: |
35 classifier_object = load_model(model_handler) | 35 classifier_object = load_model(model_handler) |
36 | 36 |
37 header = 'infer' if params["selected_tasks"]["header"] else None | 37 header = 'infer' if params["selected_tasks"]["header"] else None |
38 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=header, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False) | 38 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=header, index_col=None, parse_dates=True, encoding=None) |
39 prediction = classifier_object.predict(data) | 39 prediction = classifier_object.predict(data) |
40 prediction_df = pandas.DataFrame(prediction) | 40 prediction_df = pandas.DataFrame(prediction) |
41 res = pandas.concat([data, prediction_df], axis=1) | 41 res = pandas.concat([data, prediction_df], axis=1) |
42 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False) | 42 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False) |
43 | 43 |