Skip to content

Commit

Permalink
Merge pull request #565 from zargham-ahmad/mfassignr-tools
Browse files Browse the repository at this point in the history
Mfassignr ISOFiltr tool
  • Loading branch information
hechth authored Aug 7, 2024
2 parents 44e9371 + 19b171f commit 1ff446e
Show file tree
Hide file tree
Showing 6 changed files with 23,484 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/mfassignr/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: MFAssignR
owner: recetox
remote_repository_url: "https://github.com/RECETOX/galaxytools/tree/master/tools/mfassignr"
homepage_url: "https://github.com/RECETOX/MFAssignR"
categories:
- Metabolomics
description: "The MFAssignR package was designed for multi-element molecular formula (MF) assignment of ultrahigh resolution mass spectrometry measurements"
long_description: |
"The MFAssignR package was designed for multi-element molecular formula (MF) assignment of ultrahigh resolution mass spectrometry measurements.
A number of tools for internal mass recalibration, MF assignment, signal-to-noise evaluation, and unambiguous MF assignments are provided. "
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "{{ tool_name }} tool from the MFAssignR package"
suite:
name: suite_mfassignr
description: tools from MFAssignR are used for multi-element molecular formula (MF) assignment of ultrahigh resolution mass spectrometry measurements.
type: repository_suite_definition
50 changes: 50 additions & 0 deletions tools/mfassignr/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<macros>
<token name="@TOOL_VERSION@">1.0.3</token>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">r-mfassignr</requirement>
</requirements>
</xml>

<xml name="refs">
<xrefs>
<xref type="bio.tools">mfassignr</xref>
</xrefs>
</xml>

<xml name="creator">
<creator>
<person
givenName="Zargham"
familyName="Ahmad"
url="https://github.com/zargham-ahmad"
identifier="0000-0002-6096-224X" />
<organization
url="https://www.recetox.muni.cz/"
email="[email protected]"
name="RECETOX MUNI" />
</creator>
</xml>

<xml name="isofiltr_param">
<param name="peaks" type="data" format="tabular" label="Input Peak Data"
help="The input data frame containing abundance and peak mass."/>
<param name="SN" type="float" value="0" label="Signal-to-Noise Ratio"
help="Sets the noise cut for the data; peaks below this value will not be evaluated."/>
<param name="Carbrat" type="float" value="60" min="5" label="Maximum 13C/12C Ratio"
help="Sets the maximum allowed ratio for matching 13C isotopes."/>
<param name="Sulfrat" type="float" value="30" label="Maximum 34S/32S Ratio"
help="Sets the maximum allowed ratio for matching 34S isotopes."/>
<param name="Sulferr" type="float" value="5" label="Maximum Error for 34S Matching (ppm)"
help="Sets the maximum allowed error (ppm) for 34S mass matching."/>
<param name="Carberr" type="float" value="5" label="Maximum Error for 13C Matching (ppm)"
help="Sets the maximum allowed error (ppm) for 13C mass matching."/>
</xml>

<xml name="citations">
<citations>
<citation type="doi">10.1016/j.envres.2020.110114</citation>
</citations>
</xml>

</macros>
64 changes: 64 additions & 0 deletions tools/mfassignr/mfassignr_isofiltr.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<tool id="mfassignr_isofiltr" name="MFAssignR IsoFiltR" version="@TOOL_VERSION@+galaxy0">
<description>
IsoFiltR separates likely isotopic masses from monoisotopic masses in a mass list.
</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="creator" />
<expand macro="refs" />

<expand macro="requirements" />
<command detect_errors="exit_code"><![CDATA[
Rscript
-e 'source("${mfassignr_isofiltr}")'
]]>
</command>
<configfiles>
<configfile name="mfassignr_isofiltr"><![CDATA[
peaks <- read.table("$peaks", header=TRUE, sep="\t")
result <- MFAssignR::IsoFiltR(
peaks = peaks,
SN = $SN,
Carbrat = $Carbrat,
Sulfrat = $Sulfrat,
Sulferr = $Sulferr,
Carberr = $Carberr
)
write.table(result[["Mono"]], file="$mono_out", sep="\t", row.names=FALSE)
write.table(result[["Iso"]], file="$iso_out", sep="\t", row.names=FALSE)
]]></configfile>
</configfiles>
<inputs>
<expand macro="isofiltr_param"/>
</inputs>
<outputs>
<data name="mono_out" format="tabular" label="Monoisotopic Masses"/>
<data name="iso_out" format="tabular" label="Isotopic Masses"/>
</outputs>
<tests>
<test>
<param name="peaks" value="QC1_1_POS_500.tabular" ftype="tabular"/>
<output name="mono_out" file="isofiltr_output1.tabular" ftype="tabular"/>
<output name="iso_out" file="isofiltr_output2.tabular" ftype="tabular"/>
</test>
</tests>
<help>
IsoFiltR identifies and separates likely isotopic masses from monoisotopic masses in a mass list.
This should be done prior to formula assignment to reduce incorrect formula assignments.

The input is a table containing abundance and peak mass in the following format:

+--------------------+-------------------+------------------------+
| mz | area | rt |
+====================+===================+========================+
| 110.03486266079899 | 3410926.862054969 | 190.03735922916195 |
+--------------------+-------------------+------------------------+
| 110.05988136843429 | 7658687.858 | 241.17645551084158 |
+--------------------+-------------------+------------------------+
| ... | ... | ... |
+--------------------+-------------------+------------------------+
</help>
<expand macro="citations"/>
</tool>
Loading

0 comments on commit 1ff446e

Please sign in to comment.