Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
40222b0
plot function
nilchia Jun 3, 2025
85dd9fa
correct df and plot save with plotline
nilchia Jun 4, 2025
3ccbce9
default to jpg
nilchia Jun 4, 2025
98aa070
python lint
nilchia Jun 4, 2025
f432cf1
minor spell check and cleaning
nilchia Jun 4, 2025
7b36761
add plot inputs
nilchia Jun 4, 2025
36d6bca
bump version
nilchia Jun 4, 2025
9953efe
add the command
nilchia Jun 4, 2025
a6fc02f
removed title from plot function. should be reported upstream
nilchia Jun 4, 2025
9f29a07
add output
nilchia Jun 4, 2025
17c305f
add test
nilchia Jun 4, 2025
df1c24e
update test
nilchia Jun 4, 2025
f5353a3
correct &&
nilchia Jun 4, 2025
caa5eed
add km plot
nilchia Jun 5, 2025
b77eaca
update km function
nilchia Jun 5, 2025
1293298
correct variable names
nilchia Jun 5, 2025
cd40808
dimred for multiple target variables
nilchia Jun 5, 2025
71faab2
autodetect the color type
nilchia Jun 5, 2025
db2d551
update wrapper
nilchia Jun 5, 2025
718b54d
update tool version
nilchia Jun 5, 2025
46ed1ab
test should pass
nilchia Jun 5, 2025
b134a50
python lint
nilchia Jun 5, 2025
73b3195
Merge branch 'master' into flexynesis_plot
nilchia Jun 6, 2025
9bfa3c9
add km plot to command and input
nilchia Jun 7, 2025
0640255
add km test
nilchia Jun 7, 2025
cdcdc3a
update km plot
nilchia Jun 8, 2025
e66421f
add test for km plot
nilchia Jun 8, 2025
f5da0ca
python lint
nilchia Jun 8, 2025
9a19af6
remove duplicated test 11
nilchia Jun 8, 2025
bb2af23
function for cox plot
nilchia Jun 11, 2025
f7db9d1
update functions
nilchia Jun 11, 2025
4b05164
add more args to cox func
nilchia Jun 11, 2025
b3aa76e
add checks for args
nilchia Jun 11, 2025
e36b761
add cox inputs
nilchia Jun 11, 2025
d65306e
remove undefined args and put correct defaults
nilchia Jun 11, 2025
dbc3ca9
add command for cox
nilchia Jun 11, 2025
47901cd
add cox test
nilchia Jun 11, 2025
c612caa
cox test pass
nilchia Jun 12, 2025
91e777a
remove duplicate test
nilchia Jun 12, 2025
8e2f914
python lint
nilchia Jun 12, 2025
c7ac615
make code cleaner
nilchia Jun 12, 2025
4c7e765
remove license link so the test pass + minor spell check
nilchia Jun 12, 2025
5751844
python lint
nilchia Jun 12, 2025
5b3299d
python lint :(
nilchia Jun 12, 2025
dbff9b5
add scatter plot function
nilchia Jun 12, 2025
f9f4132
add scatter to the wrapper
nilchia Jun 12, 2025
640e354
add plot concordance heatmap
nilchia Jun 12, 2025
c83c1da
add concordance to xml
nilchia Jun 12, 2025
9497ba5
python lint
nilchia Jun 12, 2025
48d8e16
python lint again
nilchia Jun 12, 2025
e66e114
python lint checked by flake8
nilchia Jun 13, 2025
45d9d28
scatter plot accepts multiple targets
nilchia Jun 13, 2025
23102f6
update scatter in xml
nilchia Jun 13, 2025
c443354
concordance for multiple targets
nilchia Jun 13, 2025
128a650
concordance update in xml
nilchia Jun 13, 2025
190c6fa
add pr curve function
nilchia Jun 14, 2025
c09877d
add pr curve test
nilchia Jun 14, 2025
b9da7e9
add roc_curve function
nilchia Jun 14, 2025
5a531a2
add test for roc curve
nilchia Jun 14, 2025
ae0dd06
Merge branch 'master' into flexynesis_plot
nilchia Jun 14, 2025
57f562d
add boxplot function
nilchia Jun 14, 2025
aaf8055
add boxplot tests
nilchia Jun 15, 2025
f44c40b
add test to macto
nilchia Jun 15, 2025
97ae86f
initial flexynesis plot tool
nilchia Jun 18, 2025
27f3e13
clean plot py
nilchia Jun 18, 2025
5d91113
dimred in plot tool
nilchia Jun 18, 2025
fbbf2d8
I think km plot is not needed here
nilchia Jun 18, 2025
3647db8
scatter plot in plot.xml
nilchia Jun 18, 2025
09b416d
minor spelling
nilchia Jun 18, 2025
3111ed3
concordance in plot.xml
nilchia Jun 18, 2025
a0de464
pr curve in plot.xml
nilchia Jun 18, 2025
e060b5a
roc_curve in plot.xml
nilchia Jun 18, 2025
3d1c4e0
boxplot added to plot.xml
nilchia Jun 18, 2025
da7d15b
add help
nilchia Jun 18, 2025
b78dfa6
non optional params
nilchia Jun 18, 2025
01bd0b4
start flexynesis utils
nilchia Jun 18, 2025
eb950bf
add louvain to utils
nilchia Jun 19, 2025
427eb38
get optimal k added to utils
nilchia Jun 19, 2025
f9ffad1
kmean cluster to utils
nilchia Jun 19, 2025
0be8d04
ami ari in utils
nilchia Jun 19, 2025
466ba3e
optimal cutoff not yet in the package
nilchia Jun 19, 2025
4e16815
add help
nilchia Jun 19, 2025
7ed7b4d
add cbioportal search to utils
nilchia Jun 19, 2025
792f84b
update cbioportal tool to include all avaialbe modalities
nilchia Jun 19, 2025
6b0516c
output name corrected and unified help
nilchia Jun 19, 2025
ed869c0
cat config file
nilchia Jun 19, 2025
b5e6376
correct output name
nilchia Jun 19, 2025
b85cda9
some cleanups
nilchia Jun 19, 2025
7e1f175
add creators
nilchia Jun 19, 2025
f170518
final cleanup
nilchia Jun 19, 2025
19f9fa7
add required files
nilchia Jun 19, 2025
234274f
sanitizer macro
nilchia Jun 19, 2025
bd03407
try multiple filter
nilchia Jun 19, 2025
e6f4400
remove unnecessary single quotes
nilchia Jun 20, 2025
10d3aa5
correct required files
nilchia Jun 20, 2025
75458b9
sanitize clinical vars
nilchia Jun 20, 2025
86b3396
Update tools/flexynesis/macros.xml
nilchia Jun 20, 2025
caf317c
correct help token
nilchia Jun 20, 2025
38b3f0f
add n line assert and count
nilchia Jun 20, 2025
89f20a7
Update tools/flexynesis/flexynesis_plot.xml
nilchia Jun 20, 2025
6d4c8a8
Update tools/flexynesis/flexynesis_utils.xml
nilchia Jun 20, 2025
1f3c990
Update tools/flexynesis/flexynesis_plot.xml
nilchia Jun 20, 2025
a823fca
Update tools/flexynesis/flexynesis_utils.xml
nilchia Jun 20, 2025
493ad6f
update quotation
nilchia Jun 20, 2025
251f9d0
commercial param as macro
nilchia Jun 20, 2025
5e12330
using data_column
nilchia Jun 20, 2025
3f84443
label and help start with capital
nilchia Jun 20, 2025
f6e30ae
removed disable_marker_finding
nilchia Jun 20, 2025
a67ac11
cbio tool saves all available data
nilchia Jun 20, 2025
7b9a534
added split function
nilchia Jun 20, 2025
50cbb24
add splitting too
nilchia Jun 21, 2025
22441c7
add binarize function
nilchia Jun 21, 2025
bfef80d
add binarize mutation
nilchia Jun 21, 2025
1517a4d
Update tools/flexynesis/flexynesis_cbioportal_import.xml
nilchia Jun 21, 2025
5c6474f
Merge branch 'master' into flexynesis_plot
nilchia Jun 21, 2025
c8a161c
put all path in quatation
nilchia Jun 21, 2025
fdff19a
cbio portal locked
nilchia Jun 21, 2025
35c1bde
update help
nilchia Jun 21, 2025
4d39cde
remove tool link
nilchia Jun 21, 2025
63cc824
fix cheetah
nilchia Jun 21, 2025
dae5436
cleaning up a bit
nilchia Jun 21, 2025
4fcee83
cleaning macro
nilchia Jun 21, 2025
9ce20b9
correct loc file
nilchia Jun 21, 2025
86a2b02
python lint
nilchia Jun 21, 2025
5f14d75
add filter and version to loc
nilchia Jun 21, 2025
7677034
no spaces allowed
nilchia Jun 21, 2025
f020b63
Merge branch 'master' into flexynesis_plot
nilchia Jun 23, 2025
28e4ff3
increase eps
nilchia Jun 23, 2025
37c8ae9
remove center of the mass
nilchia Jun 23, 2025
9696b36
update version 2.20
nilchia Jun 23, 2025
c86d963
add crossvalidation to cox
nilchia Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/flexynesis/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: This is a deep-learning based multi-omics bulk sequencing data inte
homepage_url: https://github.com/BIMSBbioinfo/flexynesis/tree/main
long_description: The package includes multiple types of deep learning architectures such as simple fully connected networks, supervised variational autoencoders, graph convolutional networks, multi-triplet networks different options of data layer fusion, and automates feature selection and hyperparameter optimisation.
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/flexynesis
categories:
categories:
- Machine Learning
- Statistics
- Systems Biology
Expand Down
61 changes: 0 additions & 61 deletions tools/flexynesis/fetch_cbioportal_data.py

This file was deleted.

731 changes: 638 additions & 93 deletions tools/flexynesis/flexynesis.xml

Large diffs are not rendered by default.

139 changes: 64 additions & 75 deletions tools/flexynesis/flexynesis_cbioportal_import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,116 +6,105 @@
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
@CHECK_NON_COMMERCIAL_USE@
python '$__tool_directory__/fetch_cbioportal_data.py'
--study_id '$study_id'
--data_types '$data_types'
#if $mapped_files:
--mapped_files '$mapped_files'
#end if
--split_ratio '$split_ratio'
--output_dir 'output'
mkdir -p output/data output/meta &&
python '$cbio_config' &&
cat cbioportal_data.txt &&
mv $str($study_id)/data* output/data/ &&
mv $str($study_id)/meta* output/meta/ &&
mv $str($study_id)/*.htm output/cBioPortal_validation_report.html &&
cd output/data &&
for file in *; do if [[ -f \$file ]]; then mv "\$file" "\${file%.txt}.tabular"; fi; done
]]></command>
<configfiles>
<configfile name="cbio_config"><![CDATA[
from flexynesis.utils import CBioPortalData
from contextlib import redirect_stdout

cbioportal = CBioPortalData(study_id='$study_id')
cbioportal.get_cbioportal_data(study_id='$study_id')

output_path = f"cbioportal_data.txt"
with open(output_path, 'w') as f:
with redirect_stdout(f):
cbioportal.get_cbioportal_data('lgg_tcga')
]]></configfile>
</configfiles>
<inputs>
<param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False">
<validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
</param>
<param name="study_id" type="text" label="cBioPortal study ID" help="The ID of the study to fetch from cBioPortal (e.g., 'brca_tcga')." />
<param name="data_types" type="select" multiple="true" label="Data types to fetch" help="Select the types of data to retrieve from cBioPortal.">
<option value="clin" selected="true">Clinical data (default: data_clinical_patient.txt)</option>
<option value="mut">Mutations (default: data_mutations.txt)</option>
<option value="omics">Omics data (default: data_cna.txt)</option>
<option value="other">Other custom data</option>
<expand macro="commercial_use_param"/>
<param name="study_id" label="cBioPortal study ID" type="select" help="contact the administrator of this Galaxy instance if you miss a study ID">
<options from_data_table="cbioportal">
<filter type="static_value" value="1" column="2"/>
</options>
</param>
<param name="mapped_files" type="text" optional="true" label="Mapped files" help="Comma-separated list of .txt files to map to the selected data types (e.g., 'data_clinical_sample.txt,data_mutations.txt,data_castom.txt'). Must match the number and order of data types." />
<param name="split_ratio" type="float" value="0.7" min="0.0" max="1.0" label="Training/Test split ratio" help="Proportion of data to use for training (e.g., 0.7 means 70% train, 30% test)." />
</inputs>
<outputs>
<collection name="datasets" type="list" label="${tool.name} on ${study_id}: datasets">
<discover_datasets pattern="(?P&lt;name&gt;.+_(train|test))\.csv$" format="csv" directory="output" />
<collection name="data" type="list" label="${tool.name} on ${study_id}: datasets">
<discover_datasets pattern="__name_and_ext__" format="tabular" directory="output/data"/>
</collection>
<collection name="meta" type="list" label="${tool.name} on ${study_id}: metadata">
<discover_datasets pattern="__name_and_ext__" format="tabular" directory="output/meta"/>
</collection>
<data name="report" format="html" label="${tool.name} on ${study_id}: cBioPortal validation report" from_work_dir="output/cBioPortal_validation_report.html"/>
</outputs>
<tests>
<test expect_num_outputs="1">
<test expect_num_outputs="3">
<param name="non_commercial_use" value="True"/>
<param name="study_id" value="lgg_tcga" />
<param name="data_types" value="clin,mut" />
<param name="split_ratio" value="0.7" />
<output_collection name="datasets" type="list">
<element name="clin_test">
<param name="study_id" value="lgg_tcga"/>
<output_collection name="data" type="list" count="17">
<element name="data_clinical_patient">
<assert_contents>
<has_text_matching expression="PATIENT_ID"/>
<has_n_lines n="520"/>
</assert_contents>
</element>
<element name="clin_train">
<assert_contents>
<has_text_matching expression="PATIENT_ID"/>
</assert_contents>
</element>
<element name="mut_test">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
</assert_contents>
</element>
<element name="mut_train">
<element name="data_cna">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
<has_n_lines n="24777"/>
</assert_contents>
</element>
</output_collection>
</test>
<test expect_num_outputs="1">
<param name="non_commercial_use" value="True"/>
<param name="study_id" value="lgg_tcga" />
<param name="data_types" value="clin,mut,other" />
<param name="mapped_files" value="data_clinical_patient.txt,data_mutations.txt,data_cna.txt" />
<param name="split_ratio" value="0.8" />
<output_collection name="datasets" type="list">
<element name="clin_train">
<output_collection name="meta" type="list" count="18">
<element name="meta_clinical_patient">
<assert_contents>
<has_text_matching expression="PATIENT_ID"/>
<has_text_matching expression="cancer_study_identifier: lgg_tcga"/>
<has_n_lines n="4"/>
</assert_contents>
</element>
<element name="mut_train">
<element name="meta_cna">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
</assert_contents>
</element>
<element name="other_test">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
<has_text_matching expression="data_filename: data_cna.txt"/>
<has_n_lines n="8"/>
</assert_contents>
</element>
</output_collection>
<output name="report">
<assert_contents>
<has_text_matching expression="cBioPortal validation report"/>
</assert_contents>
</output>
</test>
</tests><help><![CDATA[
</tests>
<help><![CDATA[
@COMMON_HELP@

**Flexynesis cBioPortal import**

This tool fetches data from cBioPortal using the Flexynesis `CBioPortalData` class and prepares it for use with the Flexynesis Galaxy tool. It downloads a specified study, extracts the requested data types, splits them into training and test sets, and outputs them as CSV files compatible with Flexynesis (e.g., `clin_train.csv`, `mut_test.csv`).
This tool fetches data from cBioPortal using the Flexynesis `CBioPortalData`.

**Inputs**

- **cBioPortal study ID**: The identifier of the study to fetch (e.g., `brca_tcga`, `lgg_tcga`). Find study IDs on the cBioPortal.
- **Data types to fetch**: Select one or more data types to retrieve. 'Clinical data' (`clin`) is required for splitting. Options:
- `clin`: Clinical data (default: `data_clinical_patient.txt`)
- `mut`: Mutation data (default: `data_mutations.txt`)
- `omics`: Omics data (default: `data_cna.txt`)
- `other`: Custom data type (requires `--mapped_files`)
- **Mapped files (optional)**: A comma-separated list of `.txt` files to override default filenames. Must match the number and order of selected data types (e.g., `data_clinical_sample.txt,data_mutations.txt,data_custom.txt`).
- **Training/Test split ratio**: The proportion of data for training (e.g., 0.7 means 70% train, 30% test).

**Outputs**

A collection of datasets including:
- `clin_train.csv` and `clin_test.csv`: Training and test clinical data (always included).
- `mut_train.csv` and `mut_test.csv`: Training and test mutation data (if selected).
- `omics_train.csv` and `omics_test.csv`: Training and test omics/CNA data (if selected).
- `other_train.csv` and `other_test.csv`: Training and test custom data (if `other` is selected with a mapped file).

These datasets can be used as inputs to the Flexynesis Galaxy tool for multi-omics analysis.
Two collections of data and metadata datasets and an additional html report.

**Note**: Ensure the study ID is valid and the selected data types (or mapped files) are available in the study archive. Clinical data (`clin`) is mandatory for splitting.
.. _Documentation: https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis/site/
.. _copyright holders: https://github.com/BIMSBbioinfo/flexynesis
]]></help>
<citations>
<citation type="doi">10.1101/2024.07.16.603606</citation>
</citations>
<expand macro="creator">
<person givenName="Polina" familyName="Polunina" email="polunina@informatik.uni-freiburg.de"/>
</expand>
<expand macro="citations"/>
</tool>
Loading