-
Notifications
You must be signed in to change notification settings - Fork 262
Expand file tree
/
Copy pathflexynesis_cbioportal_import.xml
More file actions
110 lines (101 loc) · 4.63 KB
/
flexynesis_cbioportal_import.xml
File metadata and controls
110 lines (101 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<tool id="flexynesis_cbioportal_import" name="Flexynesis cBioPortal import" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>and prepare cBioPortal data for Flexynesis analysis</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
@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 &&
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>
<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>
</inputs>
<outputs>
<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="3">
<param name="non_commercial_use" value="True"/>
<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="data_cna">
<assert_contents>
<has_text_matching expression="Hugo_Symbol"/>
<has_n_lines n="24777"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="meta" type="list" count="18">
<element name="meta_clinical_patient">
<assert_contents>
<has_text_matching expression="cancer_study_identifier: lgg_tcga"/>
<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>
</tests>
<help><![CDATA[
@COMMON_HELP@
**Flexynesis cBioPortal import**
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.
**Outputs**
Two collections of data and metadata datasets and an additional html report.
.. _Documentation: https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis/site/
.. _copyright holders: https://github.com/BIMSBbioinfo/flexynesis
]]></help>
<expand macro="creator">
<person givenName="Polina" familyName="Polunina" email="polunina@informatik.uni-freiburg.de"/>
</expand>
<expand macro="citations"/>
</tool>