Mercurial > repos > bgruening > biomodels_biomd0000001066
comparison biomodels_BIOMD0000001066.xml @ 0:1748c5d74df5 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/biomodelsML commit cffacdd593bbb69ea96cfd89e8062b17984451e5
author | bgruening |
---|---|
date | Tue, 07 Nov 2023 17:21:09 +0000 |
parents | |
children | e66700f4c7eb |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1748c5d74df5 |
---|---|
1 <tool id="biomodels_biomd0000001066" name="Random Forest model" version="@VERSION@" profile="22.05"> | |
2 <description>to predict efficacy of immune checkpoint blockade across multiple cancer patient cohorts</description> | |
3 <macros> | |
4 <token name="@VERSION@">1</token> | |
5 </macros> | |
6 <requirements> | |
7 <container type="docker">quay.io/galaxy/biomodels_biomd0000001066:@VERSION@</container> | |
8 </requirements> | |
9 <command><![CDATA[ | |
10 cp /home/\$NB_USER/forest16.onnx ./ && | |
11 python '$biom_script' | |
12 ]]> | |
13 </command> | |
14 <configfiles> | |
15 <configfile name="biom_script"> | |
16 <![CDATA[ | |
17 import os | |
18 import argparse | |
19 import numpy | |
20 import onnxruntime as rt | |
21 import pandas as pd | |
22 | |
23 #if $input_file.ext == "xlsx": | |
24 data_test = pd.read_excel('$input_file') | |
25 #elif $input_file.ext == "tabular": | |
26 data_test = pd.read_csv('$input_file', sep="\t") | |
27 #elif $input_file.ext == "csv": | |
28 data_test = pd.read_csv('$input_file', sep=",") | |
29 #end if | |
30 | |
31 rf16=["Cancer_Type2", "Albumin", "HED", "TMB", "FCNA", "BMI", "NLR", "Platelets", "HGB", "Stage (1:IV; 0:I-III)", "Age", "Drug (1:Combo; 0:PD1/PDL1orCTLA4)", "Chemo_before_IO (1:Yes; 0:No)","HLA_LOH", "MSI (1:Unstable; 0:Stable_Indeterminate)", "Sex (1:Male; 0:Female)"] | |
32 x_test16 = pd.DataFrame(data_test, columns=rf16) | |
33 sess = rt.InferenceSession(os.getcwd() + "/forest16.onnx") | |
34 input_name = sess.get_inputs()[0].name | |
35 label_name = sess.get_outputs()[0].name | |
36 pred_onx = sess.run([label_name], {input_name: x_test16.astype(numpy.float32).values})[0] | |
37 x_test16["Predictions"] = pred_onx | |
38 x_test16.to_csv('$output_file', sep="\t", index=None) | |
39 | |
40 ]]> | |
41 </configfile> | |
42 </configfiles> | |
43 <inputs> | |
44 <param name="input_file" type="data" label="Test data" format="tabular,csv,xlsx" multiple="false" /> | |
45 </inputs> | |
46 <outputs> | |
47 <data format="tabular" name="output_file" label="Predicted data"></data> | |
48 </outputs> | |
49 <tests> | |
50 <test> | |
51 <param name="input_file" value="test_data.tabular" ftype="tabular" /> | |
52 <output name="output_file" file="pred_data.tabular"> | |
53 <assert_contents> | |
54 <has_n_columns n="17" /> | |
55 <has_n_lines n="296" /> | |
56 </assert_contents> | |
57 </output> | |
58 </test> | |
59 <test> | |
60 <param name="input_file" value="test_data.csv" ftype="csv" /> | |
61 <output name="output_file" file="pred_data.tabular"> | |
62 <assert_contents> | |
63 <has_n_columns n="17" /> | |
64 <has_n_lines n="296" /> | |
65 </assert_contents> | |
66 </output> | |
67 </test> | |
68 <test> | |
69 <param name="input_file" value="test_data.xlsx" ftype="xlsx" /> | |
70 <output name="output_file" file="pred_data.tabular"> | |
71 <assert_contents> | |
72 <has_n_columns n="17" /> | |
73 <has_n_lines n="296" /> | |
74 </assert_contents> | |
75 </output> | |
76 </test> | |
77 </tests> | |
78 <help> | |
79 <![CDATA[ | |
80 **What it does** | |
81 | |
82 | |
83 The tool makes prediction of either responder (1) or non-responder (0) to an immunotherapy for multiple different cancer types. The features used to train a Random Forest (RF16) model include 16 genomic, molecular, demographic, and clinical. More details in associated publication: "Improved prediction of immune checkpoint blockade efficacy across multiple cancer types" (https://pubmed.ncbi.nlm.nih.gov/34725502/). The model is available via a Docker container. | |
84 | |
85 **Description** | |
86 | |
87 This is a Random Forest algorithm-based machine learning model called RF16, which incorporates a total of 16 genomic, molecular, demographic, and clinical features to predict the immunotherapy response for a patient. The model assigns a value of 0 for NonResponder and 1 for Responder. Please be aware that the column names in the GitHub code and the downloaded dataset from the publication may vary. Users are advised to make minor adjustments to either the code or the dataset to ensure compatibility. The curated version of the model has modified the column names in the training code to align with the dataset. The features used are: "Cancer_Type2", "Albumin", "HED", "TMB", "FCNA", "BMI", "NLR", "Platelets", "HGB", "Stage (1:IV; 0:I-III)", "Age", "Drug (1:Combo; 0:PD1/PDL1orCTLA4)", "Chemo_before_IO (1:Yes; 0:No)","HLA_LOH", "MSI (1:Unstable; 0:Stable_Indeterminate)", "Sex (1:Male; 0:Female)" | |
88 | |
89 **Input file** | |
90 | |
91 Provide a tabular file (as tabular or csv or xlsx) containing all the features as mentioned above. | |
92 | |
93 **Output file** | |
94 | |
95 Returns predicted data as a tabular file - the predictions are concatenated as a last column of the test data. | |
96 | |
97 ]]> | |
98 </help> | |
99 <citations> | |
100 <citation type="bibtex"> | |
101 @ARTICLE{BIOMD0000001066, | |
102 Author = {Chowell D and et al.}, | |
103 title = {{Chowell2022 - Random Forest model to predict efficacy of immune checkpoint blockade across multiple cancer patient cohorts}}, | |
104 url = {https://www.ebi.ac.uk/biomodels/BIOMD0000001066} | |
105 } | |
106 </citation> | |
107 </citations> | |
108 </tool> |