Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More parameters added to MFAssignR: MFAssignCHO and MFAssign function #595

Merged
merged 23 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f70d3f0
added parameters to MFAssignCHO
KristinaGomoryova Oct 16, 2024
699b3b9
added more parameters to mfassigncho
KristinaGomoryova Oct 17, 2024
004c8f3
parameters set as required, not optional
KristinaGomoryova Oct 17, 2024
50c767a
new parameters packed into 'Advanced' tab
KristinaGomoryova Oct 17, 2024
5122b8e
labels in advanced tab made more descriptive
KristinaGomoryova Oct 18, 2024
26c445d
data types updated
KristinaGomoryova Oct 18, 2024
594bd3e
odd electron ions assignment based on ionMode
KristinaGomoryova Oct 18, 2024
712e0f0
parameters for MFAssign/CHO restructured and updated
KristinaGomoryova Oct 18, 2024
53c0c90
default value for DeNovo parameter in MFAssign set to 300
KristinaGomoryova Oct 18, 2024
0c8bbe1
O_min data type and min changed
KristinaGomoryova Oct 21, 2024
4d8e584
DBE helptext adjusted
KristinaGomoryova Oct 21, 2024
8b5bd4d
Zx min and max values provided
KristinaGomoryova Oct 21, 2024
5217d13
iso_err boundaries adjusted
KristinaGomoryova Oct 21, 2024
320549e
S34 and C13 boundaries set
KristinaGomoryova Oct 21, 2024
5e6f911
mfassign valence params put into separate macro
KristinaGomoryova Oct 21, 2024
f2b2eef
mfassign ratios put into separate macro
KristinaGomoryova Oct 21, 2024
c038540
set amount of elements as section
KristinaGomoryova Oct 21, 2024
3c679d1
ratios set as a section
KristinaGomoryova Oct 21, 2024
330af81
other parameters
KristinaGomoryova Oct 21, 2024
90759d3
other params as section in mfassign
KristinaGomoryova Oct 21, 2024
177b155
assignment to sections updated
KristinaGomoryova Oct 21, 2024
fa0f295
galaxy version bumped
KristinaGomoryova Oct 21, 2024
c7a2b4a
if..else statement adjusted
KristinaGomoryova Oct 21, 2024
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
90 changes: 89 additions & 1 deletion tools/mfassignr/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</param>
</xml>

<xml name="mfassign_param">
<xml name="mfassign_required_shared">
<param name="ppm_err" type="integer" label="ppm_err"
help= "Error tolerance (ppm) for formula assignment" value="3"/>
<expand macro="ionmode_param" />
Expand All @@ -96,6 +96,94 @@
help= "Upper limit of molecular mass to be assigned."/>
</xml>

<xml name="mfassign_elements_shared">
<param name="Mx" type="integer" label="Amount of Sodium adduct" value="0" help= "Sets the amount of Sodium adduct to be used in assignment."/>
<param name="NH4x" type="integer" label="Amount of Ammonium adduct" value="0" help= "Sets the amount of Ammonium adduct to be used in assignment."/>
<param name="Zx" type="integer" label="Amount of charge" value="1" help= "Sets the amount of charge to be used in assignment."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="Ox" type="integer" label="Maximum number of oxygen looked for in the CHOFIT core" value="30" help= "Sets the maximum number of oxygen looked for in the CHOFIT core, it limits the number of loops performed."/>
</xml>

<xml name="mfassign_advanced_shared">
<param name="assign_typeof_ions" type="select" display="radio" label="Assign odd electron ions based on the ionization mode?" help="This parameter determines whether to assign either positive mode odd electron ions (if ionMode is positive) or negative mode odd electron ions (if ionMode is negative).">
<option value="yes">yes</option>
<option value="no" selected="true">no</option>
</param>

<param name="O_Cmin" type="float" label="Minimum allowed O/C ratio" value="0" help= "Sets the minimum allowed oxygen to carbon ratio."/>
<param name="O_Cmax" type="float" label="Upper limit for O/C ratio" value="2.5" help= "Sets the upper limit for oxygen to carbon ratio."/>
<param name="H_Cmin" type="float" label="Lower limit for H/C ratio" value="0.1" help= "Sets the lower limit for hydrogen to carbon ratio."/>
<param name="H_Cmax" type="float" label="Upper limit for H/C ratio" value="3" help= "Sets the upper limit for hydrogen to carbon ratio for assigned formulas."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="DBEOmin" type="float" label="Lower limit for DBE minus oxygen QA parameter" value="-13" help= "Sets the lower limit for DBE minus oxygen QA parameter."/>
<param name="DBEOmax" type="float" label="Upper limit for DBE minus oxygen QA parameter" value="13" help= "Sets the upper limit for DBE minus oxygen QA parameter."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="Omin" type="float" label="Lower limit for number of O in assigned formula" value="0" help= "Sets the lower limit for oxygen number in assigned formula."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="max_def" type="float" label="Upper limit for KMD" value="0.9" help= "Sets the upper limit of mass defect for using floor() instead of round() for KMD."/>
<param name="min_def" type="float" label="Lower limit for KMD" value="0.5" help= "Sets the lower limit of mass defect for using floor() instead of round() for KMD."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name = "HetCut" type="select" display="radio" label="Turn on the high heteroatom QA parameter?" help= "HetCut turns on or off the high heteroatom QA parameter.">
<option value="on">yes</option>
<option value="off" selected="true">no</option>
</param>
<param name = "NMScut" type="select" display="radio" label="NMScut" help= "Turn on the nominal mass series QA parameter?">
<option value="on" selected="true">yes</option>
<option value="off">no</option>
</param>
<param name="nLoop" type="integer" label="Number of times the KMD and z* series assignment loops" value="5" help= "Sets the number of times the KMD and z* series assignment loops."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="ambig_bool" type="select" display="radio" label="Turn on the increased ambiguity for assignment?" help= "Turns on or off increased ambiguity for assignment.">
<option value="on">yes</option>
<option value="off" selected="true">no</option>
</param>
<param name = "MSMS" type="select" display="radio" label="Turn on the CH2 KMD prescreening before initial assignment?" help= "Turns on or off CH2 KMD prescreening before initial assignment.">
<option value="on" >yes</option>
<option value="off" selected="true">no</option>
</param>
</xml>

<xml name="mfassigncho_param">
<expand macro="mfassign_required_shared" />
<section name="advanced" title="Advanced" expanded="false">
<param name="Ex" type="integer" label="Amount of Chlorine 37" value="0" help= "Sets the amount of Chlorine 37 to be used in assignment."/>
<expand macro="mfassign_elements_shared" />
<expand macro="mfassign_advanced_shared" />
<param name="DeNovo" type="float" label="De novo cut point for the data" value="1000" help= "Sets the de novo cut point for the data."/>
hechth marked this conversation as resolved.
Show resolved Hide resolved
</section>
</xml>

<xml name="mfassign_param">
<expand macro="mfassign_required_shared" />
<section name="advanced" title="Advanced" expanded="false">
<param name="Nx" type="integer" label="Amount of Nitrogen 14" value="0" help= "Sets the maximum allowable number of Nitrogen 14 to be used in assign"/>
<param name="Sx" type="integer" label="Amount of Sulphur 32" value="0" help= "Sets the maximum allowable number of Sulfur 32 to be used in assign"/>
<param name="Px" type="integer" label="Amount of Phosphorus 31" value="0" help= "Sets the maximum allowable number of Phosphorus 31 to be used in assign"/>
<param name="Ex" type="integer" label="Amount of Carbon 13" value="0" help= "Sets the amount of Carbon 13 to be used in assignment."/>
<param name="S34x" type="integer" label="Amount of Sulfur 34" value="0" help= "Sets the amount of Sulfur 34 to be used in assignment."/>
<param name="N15x" type="integer" label="Amount of Nitrogen 15" value="0" help= "Sets the amount of Nitrogen 15 to be used in assignment."/>
<param name="Dx" type="integer" label="Amount of Deuterium" value="0" help= "Sets the amount of Deuterium to be used in assignment."/>
<param name="Clx" type="integer" label="Amount of Chlorine" value="0" help= "Sets the amount of Chlorine to be used in assignment."/>
<param name="Fx" type="integer" label="Amount of Fluorine" value="0" help= "Sets the amount of Fluorine to be used in assignment."/>
<param name="Cl37x" type="integer" label="Amount of Chlorine 37" value="0" help= "Sets the amount of Chlorine 37 to be used in assignment."/>
<param name="Br81x" type="integer" label="Amount of Bromine 81" value="0" help= "Sets the amount of Bromine 81 to be used in assignment."/>
<param name="Ix" type="integer" label="Amount of Iodine 127" value="0" help= "Sets the amount of Iodine 127 to be used in assignment."/>
<expand macro="mfassign_elements_shared" />
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name="Sval" type="integer" label="Valence of Sulphur" value="2" help= "Sets the valence of Sulfur."/>
<param name="Nval" type="integer" label="Valence of Nitrogen" value="3" help= "Sets the valence of Nitrogen."/>
<param name="S34val" type="integer" label="Valence of Sulphur 34" value="2" help= "Sets the valence of Sulfur 34."/>
<param name="N15val" type="integer" label="Valence of Nitrogen 15" value="3" help= "Sets the valence of Nitrogen 15."/>
<param name="Pval" type="integer" label="Valence of Phosphorus" value="5" help= "Sets the valence of Phosphorus."/>
<param name="iso_err" type="integer" label="Error tolerance (ppm) for polyisotope matching" value="3" help= "Sets the the error tolerance (ppm) for polyisotope matching."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<expand macro="mfassign_advanced_shared" />
<param name = "SulfCheck" type="select" display="radio" label="Turn on the sulfur isotope check?" help= "Turns on or off the sulfur isotope check QA parameter.c">
<option value="on" selected="true">yes</option>
<option value="off">no</option>
</param>
<param name="S34_abund" type="integer" label="Maximum 34S/32S isotope ratio" value="30" help= "Sets the maximum 34S/32S isotope ratio for isotope matching."/>
<param name="C13_abund" type="integer" label="Maximum 13C/12C isotope ratio" value="60" help= "Sets the maximum 13C/12C isotope ratio for isotope matching."/>
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
<param name = "N3corr" type="select" display="radio" label="Turn on the correction of N3OS monoisotopic assignments to 13C assignment?" help= "Turns on or off correction of N3OS monoisotopic assignments to 13C assignment.">
<option value="on" selected="true">yes</option>
<option value="off">no</option>
</param>
<param name="DeNovo" type="float" label="De novo cut point for the data" value="300" help= "Sets the de novo cut point for the data."/>
</section>
</xml>

<xml name="findrecalseries_param">
<param name="input_file" type="data" format="tabular" label="Input data"
help= "Recalibration series, output from RecalList"/>
Expand Down
58 changes: 57 additions & 1 deletion tools/mfassignr/mfassignr_mfassign.xml
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
iso <- read.delim("$input_iso", sep="\t")
#end if
SN = $sn_ratio * $kmdn
POEx = 0
NOEx = 0

#if "$assign_typeof_ions"=="yes"
#if $ionMode=="pos"
POEx = 1
NOEx = 0
#end if
#if $ionMode=="neg"
POEx = 0
NOEx = 1
#end if
KristinaGomoryova marked this conversation as resolved.
Show resolved Hide resolved
#end if

MF_assign <- MFAssignR::MFAssign(
peaks = mono,
Expand All @@ -29,7 +42,50 @@
lowMW = $lowMW,
highMW = $highMW,
ppm_err = $ppm_err,
SN = SN
SN = SN,
POEx = POEx,
NOEx = NOEx,
Nx = $Nx,
Sx = $Sx,
Px = $Px,
S34x = $S34x,
N15x = $N15x,
Dx = $Dx,
Clx = $Clx,
Fx = $Fx,
Cl37x = $Cl37x,
Br81x = $Br81x,
Ix = $Ix,
Ex = $Ex,
Mx = $Mx,
NH4x = $NH4x,
Zx = $Zx,
Ox = $Ox,
O_Cmin = $O_Cmin,
O_Cmax = $O_Cmax,
H_Cmin = $H_Cmin,
H_Cmax = $H_Cmax,
DBEOmin = $DBEOmin,
DBEOmax = $DBEOmax,
Omin = $Omin,
max_def = $max_def,
min_def = $min_def,
HetCut = "$HetCut",
NMScut = "$NMScut",
DeNovo = $DeNovo,
nLoop = $nLoop,
Ambig = "$ambig_bool",
MSMS = "$MSMS",
Sval = $Sval,
Nval = $Nval,
S34val = $S34val,
N15val = $N15val,
Pval = $Pval,
iso_err = $iso_err,
SulfCheck = "$SulfCheck",
S34_abund = $S34_abund,
C13_abund = $C13_abund,
N3corr = "$N3corr"
)

write.table(MF_assign[['Unambig']], file = '$Unambig', row.names= FALSE, sep = "\t")
Expand Down
41 changes: 38 additions & 3 deletions tools/mfassignr/mfassignr_mfassignCHO.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="mfassignr_mfassignCHO" name="MFAssignR MFAssignCHO" version="@TOOL_VERSION@+galaxy0" profile="23.0">
<tool id="mfassignr_mfassignCHO" name="MFAssignR MFAssignCHO" version="@TOOL_VERSION@+galaxy1" profile="23.0">
<description>Molecular formula assignment (only with CHO).</description>
<macros>
<import>macros.xml</import>
Expand All @@ -22,6 +22,19 @@
iso <- read.delim("$input_iso", sep="\t")
#end if
SN = $sn_ratio * $kmdn
POEx = 0
NOEx = 0

#if "$assign_typeof_ions"=="yes"
#if $ionMode=="pos"
POEx = 1
NOEx = 0
#end if
#if $ionMode=="neg"
POEx = 0
NOEx = 1
#end if
#end if
hechth marked this conversation as resolved.
Show resolved Hide resolved

MF_CHO_assign <- MFAssignR::MFAssignCHO(
peaks = mono,
Expand All @@ -32,7 +45,29 @@
lowMW = $lowMW,
highMW = $highMW,
ppm_err = $ppm_err,
SN = SN
SN = SN,
POEx = POEx,
NOEx = NOEx,
Ex = $Ex,
Mx = $Mx,
NH4x = $NH4x,
Zx = $Zx,
Ox = $Ox,
O_Cmin = $O_Cmin,
O_Cmax = $O_Cmax,
H_Cmin = $H_Cmin,
H_Cmax = $H_Cmax,
DBEOmin = $DBEOmin,
DBEOmax = $DBEOmax,
Omin = $Omin,
max_def = $max_def,
min_def = $min_def,
HetCut = "$HetCut",
NMScut = "$NMScut",
DeNovo = $DeNovo,
nLoop = $nLoop,
Ambig = "$ambig_bool",
MSMS = "$MSMS"
)

write.table(MF_CHO_assign[['Unambig']], file = '$Unambig', row.names= FALSE, sep = "\t")
Expand All @@ -52,7 +87,7 @@
help= "Data frame containing monoisotopic masses, output from the IsoFiltR function"/>
<param name="input_iso" optional="true" type="data" format="tabular" label="Data frame of isotopic masses"
help= "Data frame containing isotopic masses, output from the IsoFiltR function"/>
<expand macro="mfassign_param"/>
<expand macro="mfassigncho_param"/>
</inputs>
<outputs>
<data name="Unambig" format="tabular" label="Unambiguous assignments by ${tool.name} on ${on_string}"/>
Expand Down
Loading