Skip to content
Draft
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
5 changes: 3 additions & 2 deletions tools/recetox_aplcms/macros.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<macros>
<token name="@TOOL_VERSION@">0.13.4</token>
<token name="@TOOL_VERSION@">0.14.1</token>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">r-recetox-aplcms</requirement>
<requirement type="package" version="2.5.2">pymzml</requirement>
<requirement type="package" version="2.5.11">pymzml</requirement>
<yield />
</requirements>
</xml>

Expand Down
15 changes: 13 additions & 2 deletions tools/recetox_aplcms/recetox_aplcms_align_features.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_align_features" name="recetox-aplcms - align features" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_align_features" name="recetox-aplcms - align features" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>align peaks across samples</description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -56,7 +56,18 @@
</outputs>

<tests>
<test expect_failure="true" />
<test expect_num_outputs="3">
<param name="files" ftype="parquet">
<collection type="list">
<element name="RCX_06_shortened_extracted_clusters.parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/clusters/RCX_06_shortened_extracted_clusters.parquet?ref_type=heads&amp;inline=false"/>
<element name="RCX_07_shortened_extracted_clusters.parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/clusters/RCX_07_shortened_extracted_clusters.parquet?ref_type=heads&amp;inline=false"/>
<element name="RCX_08_shortened_extracted_clusters.parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/clusters/RCX_08_shortened_extracted_clusters.parquet?ref_type=heads&amp;inline=false"/>
</collection>
</param>
<output name="metadata_file" ftype="parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/aligned/metadata_table.parquet?ref_type=heads&amp;inline=false"/>
<output name="rt_file" ftype="parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/aligned/rt_table.parquet?ref_type=heads&amp;inline=false"/>
<output name="intensity_file" ftype="parquet" location="https://gitlab.ics.muni.cz/umsa/umsa-files/-/raw/master/testdata/recetox-aplcms/aligned/intensity_table.parquet?ref_type=heads&amp;inline=false"/>
</test>
</tests>

<help>
Expand Down
2 changes: 1 addition & 1 deletion tools/recetox_aplcms/recetox_aplcms_compute_clusters.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_compute_clusters" name="recetox-aplcms - compute clusters" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_compute_clusters" name="recetox-aplcms - compute clusters" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>compute clusters of mz and rt across samples and assign cluster IDs to individual features</description>
<macros>
<import>macros.xml</import>
Expand Down
2 changes: 1 addition & 1 deletion tools/recetox_aplcms/recetox_aplcms_compute_template.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_compute_template" name="recetox-aplcms - compute template" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_compute_template" name="recetox-aplcms - compute template" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>compute retention time correction template feature table</description>
<macros>
<import>macros.xml</import>
Expand Down
2 changes: 1 addition & 1 deletion tools/recetox_aplcms/recetox_aplcms_correct_time.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_correct_time" name="recetox-aplcms - correct time" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_correct_time" name="recetox-aplcms - correct time" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>correct retention time across samples for peak alignment</description>
<macros>
<import>macros.xml</import>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_generate_feature_table" name="recetox-aplcms - generate feature table" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_generate_feature_table" name="recetox-aplcms - generate feature table" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>generate feature table from noise-removed HRMS profile data</description>
<macros>
<import>macros.xml</import>
Expand Down
2 changes: 1 addition & 1 deletion tools/recetox_aplcms/recetox_aplcms_merge_known_table.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_merge_known_table" name="recetox-aplcms - merge known table" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_merge_known_table" name="recetox-aplcms - merge known table" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>join knowledge from aligned features and known table.</description>
<macros>
<import>macros.xml</import>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_recover_weaker_signals" name="recetox-aplcms - recover weaker signals" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_recover_weaker_signals" name="recetox-aplcms - recover weaker signals" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>recover weaker signals from raw data using an aligned feature table</description>
<macros>
<import>macros.xml</import>
Expand Down
39 changes: 33 additions & 6 deletions tools/recetox_aplcms/recetox_aplcms_remove_noise.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="recetox_aplcms_remove_noise" name="recetox-aplcms - remove noise" version="@TOOL_VERSION@+galaxy0" profile="21.09">
<tool id="recetox_aplcms_remove_noise" name="recetox-aplcms - remove noise" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<description>filter noise and detect peaks in high resolution mass spectrometry (HRMS) profile data</description>
<macros>
<import>macros.xml</import>
Expand All @@ -10,18 +10,29 @@
</edam_operations>
<expand macro="refs"/>
<expand macro="creator"/>
<expand macro="requirements"/>
<expand macro="requirements">
<requirement type="package" version="1.10.2">bioconductor-rawrr</requirement>
<!-- <requirement type="package" version="6.12.0.199">mono</requirement> -->
</expand>

<command detect_errors="aggressive"><![CDATA[
python '${__tool_directory__}/mzml_id_getter.py' '$input_file';
Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${run_script}")'
#if $input_file.ext == 'thermo.raw':
cp $input_file input.$input_file.ext &&
Rscript -e 'source("${install_rawrr}")' &&
Rscript -e 'source("${raw_id_getter}")' &&
Rscript -e "future::plan(future::multicore, workers = \${GALAXY_SLOTS:-1})" &&
#else:
ln -s $input_file input.$input_file.ext &&
python '${__tool_directory__}/mzml_id_getter.py' '$input_file';
#end if
Rscript -e 'source("${__tool_directory__}/utils.R")' -e 'source("${run_script}")' -e 'future::plan(future::sequential)'
]]></command>
<configfiles>
<configfile name="run_script"><![CDATA[
sample_name <- readChar('sample_name.txt', file.info('sample_name.txt')\$size)

profile <- remove_noise(
filename = '$input_file',
filename = 'input.${input_file.ext}',
min_pres = $min_pres,
min_run = $min_run,
mz_tol = ${mz_tol}/1e6,
Expand All @@ -36,10 +47,21 @@
profile <- save_sample_name(profile, sample_name)
save_data_as_parquet_file(profile, '$output_file')
]]></configfile>

<configfile name="raw_id_getter"><![CDATA[
header <- rawrr::readFileHeader('input.${input_file.ext}')
writeLines(header[['Sample id']], "sample_name.txt")
]]></configfile>

<configfile name="install_rawrr"><![CDATA[
rawrr::installRawFileReaderDLLs()
rawrr::installRawrrExe()
rawrr::rawrrAssemblyPath()
]]></configfile>
</configfiles>

<inputs>
<param label="Input spectra data" name="input_file" type="data" format="mzml"
<param label="Input spectra data" name="input_file" type="data" format="mzml,thermo.raw"
help="Sample data in .mzml format acquired in profile mode." />
<expand macro="remove_noise_params"/>
</inputs>
Expand All @@ -58,6 +80,11 @@
<param name="grouping_threshold" value="2" />
<output name="output_file" file="remove_noise_docker_threshold.parquet" ftype="parquet" />
</test>
<test>
<param name="input_file" ftype="thermo.raw" location="https://zenodo.org/records/7890956/files/8_qc_no_dil_milliq.raw?download=1"/>
<param name="grouping_threshold" value="2" />
<output name="output_file" ftype="parquet" md5="a43a29b2e79c59d40bfb8c24c674f899"/>
</test>
</tests>

<help>
Expand Down
Binary file modified tools/recetox_aplcms/test-data/peak_table_galaxy.parquet
Binary file not shown.
Binary file modified tools/recetox_aplcms/test-data/remove_noise_docker.parquet
Binary file not shown.
Binary file not shown.
Loading