Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 18 additions & 18 deletions tools/flexynesis/flexynesis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,18 +1045,18 @@
<output_collection name="plots" type="list">
<element name="job.embeddings_test_pca_Erlotinib_known">
<assert_contents>
<has_image_center_of_mass center_of_mass="962,732" eps="5"/>
<has_image_center_of_mass center_of_mass="962,732" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1941"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1941" delta="10"/>
</assert_contents>
</element>
<element name="job.embeddings_test_pca_Erlotinib_predicted">
<assert_contents>
<has_image_center_of_mass center_of_mass="959.5,732.5" eps="5"/>
<has_image_center_of_mass center_of_mass="959.5,732.5" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1941"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1941" delta="10"/>
</assert_contents>
</element>
</output_collection>
Expand All @@ -1076,10 +1076,10 @@
<output_collection name="plots" type="list">
<element name="clin_km_km_risk_subtypes">
<assert_contents>
<has_image_center_of_mass center_of_mass="971,732" eps="5"/>
<has_image_center_of_mass center_of_mass="971,732" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1941"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1941" delta="10"/>
</assert_contents>
</element>
</output_collection>
Expand All @@ -1102,10 +1102,10 @@
<output_collection name="plots" type="list">
<element name="job.final_model_cox_hazard_ratios">
<assert_contents>
<has_image_center_of_mass center_of_mass="972,737" eps="5"/>
<has_image_center_of_mass center_of_mass="972,737" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1941"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1941" delta="10"/>
</assert_contents>
</element>
</output_collection>
Expand All @@ -1124,10 +1124,10 @@
<output_collection name="plots" type="list">
<element name="job.predicted_labels_scatter_Erlotinib">
<assert_contents>
<has_image_center_of_mass center_of_mass="969,735" eps="5"/>
<has_image_center_of_mass center_of_mass="969,735" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1940"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1940" delta="10"/>
</assert_contents>
</element>
</output_collection>
Expand Down Expand Up @@ -1257,10 +1257,10 @@
<output_collection name="plots" type="list">
<element name="job.final_model_cox_hazard_ratios">
<assert_contents>
<has_image_center_of_mass center_of_mass="972,737" eps="5"/>
<has_image_center_of_mass center_of_mass="972,737" eps="20"/>
<has_image_channels channels="3"/>
<has_image_height height="1461"/>
<has_image_width width="1941"/>
<has_image_height height="1461" delta="10"/>
<has_image_width width="1941" delta="10"/>
</assert_contents>
</element>
</output_collection>
Expand Down
114 changes: 105 additions & 9 deletions tools/flexynesis/flexynesis_cbioportal_import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,28 @@
</macros>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
## list of studies with html report
#set $htm_studies = ['lgg_tcga', 'cesc_tcga']
#set $html_studies = ['acc_tcga_gdc', 'alal_target_gdc', 'aml_target_gdc', 'aml_tcga_gdc', 'blca_tcga_gdc',
'bll_target_gdc', 'brain_cptac_gdc', 'brca_tcga_gdc', 'breast_cptac_gdc', 'ccrcc_tcga_gdc',
'cesc_tcga_gdc', 'chol_tcga_gdc', 'chrcc_tcga_gdc', 'coad_cptac_gdc', 'coad_tcga_gdc',
'difg_tcga_gdc', 'dlbclnos_tcga_gdc', 'esca_tcga_gdc', 'gbm_tcga_gdc', 'hcc_tcga_gdc',
'hgsoc_tcga_gdc', 'hnsc_tcga_gdc', 'luad_cptac_gdc', 'luad_tcga_gdc', 'lusc_cptac_gdc',
'lusc_tcga_gdc', 'mnet_tcga_gdc', 'nbl_target_gdc', 'nsgct_tcga_gdc', 'ohnca_cptac_gdc',
'os_target_gdc', 'ovary_cptac_gdc', 'paad_tcga_gdc', 'pancreas_cptac_gdc', 'plmeso_tcga_gdc',
'prad_tcga_gdc', 'prcc_tcga_gdc', 'rcc_cptac_gdc', 'read_tcga_gdc', 'skcm_tcga_gdc',
'soft_tissue_tcga_gdc', 'stad_tcga_gdc', 'thpa_tcga_gdc', 'thym_tcga_gdc', 'ucec_tcga_gdc',
'ucs_tcga_gdc', 'uec_cptac_gdc', 'um_tcga_gdc', 'wt_target_gdc']
@CHECK_NON_COMMERCIAL_USE@
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 &&
#if $study_id in $htm_studies:
mv $str($study_id)/*.htm output/cBioPortal_validation_report.html &&
#else if $study_id in $html_studies:
mv $str($study_id)/validation_reports/*validation.html output/cBioPortal_validation_report.html &&
#end if
cd output/data &&
for file in *; do if [[ -f \$file ]]; then mv "\$file" "\${file%.txt}.tabular"; fi; done
]]></command>
Expand All @@ -22,11 +37,6 @@ 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>
Expand All @@ -44,9 +54,18 @@ with open(output_path, 'w') as f:
<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"/>
<data name="report" format="html" label="${tool.name} on ${study_id}: cBioPortal validation report" from_work_dir="output/cBioPortal_validation_report.html">
<!-- note about the filter here:
Not all studies in the cbioportal datahub have html reports.
The main repository can be find here: https://github.com/cBioPortal/datahub/
Two studies in https://github.com/cBioPortal/datahub/tree/master/public have html reports (as .htm files),
and studies in crdc here: https://github.com/cBioPortal/datahub/tree/master/crdc have html reports
So from 479 studies only 51 have this report. -->
<filter>study_id in ['lgg_tcga', 'cesc_tcga', 'acc_tcga_gdc', 'alal_target_gdc', 'aml_target_gdc', 'aml_tcga_gdc', 'blca_tcga_gdc', 'bll_target_gdc', 'brain_cptac_gdc', 'brca_tcga_gdc', 'breast_cptac_gdc', 'ccrcc_tcga_gdc', 'cesc_tcga_gdc', 'chol_tcga_gdc', 'chrcc_tcga_gdc', 'coad_cptac_gdc', 'coad_tcga_gdc', 'difg_tcga_gdc', 'dlbclnos_tcga_gdc', 'esca_tcga_gdc', 'gbm_tcga_gdc', 'hcc_tcga_gdc', 'hgsoc_tcga_gdc', 'hnsc_tcga_gdc', 'luad_cptac_gdc', 'luad_tcga_gdc', 'lusc_cptac_gdc', 'lusc_tcga_gdc', 'mnet_tcga_gdc', 'nbl_target_gdc', 'nsgct_tcga_gdc', 'ohnca_cptac_gdc', 'os_target_gdc', 'ovary_cptac_gdc', 'paad_tcga_gdc', 'pancreas_cptac_gdc', 'plmeso_tcga_gdc', 'prad_tcga_gdc', 'prcc_tcga_gdc', 'rcc_cptac_gdc', 'read_tcga_gdc', 'skcm_tcga_gdc', 'soft_tissue_tcga_gdc', 'stad_tcga_gdc', 'thpa_tcga_gdc', 'thym_tcga_gdc', 'ucec_tcga_gdc', 'ucs_tcga_gdc', 'uec_cptac_gdc', 'um_tcga_gdc', 'wt_target_gdc']</filter>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a large comment

</data>
</outputs>
<tests>
<!-- test 1: html report public-->
<test expect_num_outputs="3">
<param name="non_commercial_use" value="True"/>
<param name="study_id" value="lgg_tcga"/>
Expand Down Expand Up @@ -84,6 +103,77 @@ with open(output_path, 'w') as f:
</assert_contents>
</output>
</test>
<!-- test 2: html report crdc-->
<test expect_num_outputs="3">
<param name="non_commercial_use" value="True"/>
<param name="study_id" value="acc_tcga_gdc"/>
<output_collection name="data" type="list" count="14">
<element name="data_clinical_patient">
<assert_contents>
<has_text_matching expression="PATIENT_ID"/>
<has_n_lines n="97"/>
</assert_contents>
</element>
<element name="data_cna">
<assert_contents>
<has_text_matching expression="Entrez_Gene_Id"/>
<has_n_lines n="38322"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="meta" type="list" count="15">
<element name="meta_clinical_patient">
<assert_contents>
<has_text_matching expression="cancer_study_identifier: acc_tcga_gdc"/>
<has_n_lines n="4"/>
</assert_contents>
</element>
<element name="meta_cna">
<assert_contents>
<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>
<!-- test 3: no report -->
<test expect_num_outputs="2">
<param name="non_commercial_use" value="True"/>
<param name="study_id" value="acc_2019"/>
<output_collection name="data" type="list" count="8">
<element name="data_clinical_patient">
<assert_contents>
<has_text_matching expression="PATIENT_ID"/>
<has_n_lines n="1050"/>
</assert_contents>
</element>
<element name="data_cna">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
<has_n_lines n="21673"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="meta" type="list" count="9">
<element name="meta_clinical_patient">
<assert_contents>
<has_text_matching expression="cancer_study_identifier:acc_2019"/>
<has_n_lines n="4"/>
</assert_contents>
</element>
<element name="meta_cna">
<assert_contents>
<has_text_matching expression="data_filename: data_cna.txt"/>
<has_n_lines n="8"/>
</assert_contents>
</element>
</output_collection>
</test>
</tests>
<help><![CDATA[
@COMMON_HELP@
Expand All @@ -98,10 +188,16 @@ This tool fetches data from cBioPortal using the Flexynesis `CBioPortalData`.

**Outputs**

Two collections of data and metadata datasets and an additional html report.
Two collections of data and metadata datasets and an additional html report (if available).


The available datasets can be checked from here_

If the study ID is not available, please contact the administrator of this Galaxy instance.

.. _Documentation: https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis/site/
.. _copyright holders: https://github.com/BIMSBbioinfo/flexynesis
.. _here: https://github.com/cBioPortal/datahub/
]]></help>
<expand macro="creator">
<person givenName="Polina" familyName="Polunina" email="polunina@informatik.uni-freiburg.de"/>
Expand Down
2 changes: 1 addition & 1 deletion tools/flexynesis/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">0.2.20</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@PROFILE@">24.1</token>
<xml name="requirements">
<requirements>
Expand Down
2 changes: 2 additions & 0 deletions tools/flexynesis/test-data/loc.sample
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
lgg_tcga lgg_tcga 1
acc_tcga_gdc acc_tcga_gdc 1
acc_2019 acc_2019 1
Loading