Skip to content

Commit

Permalink
parameters for MFAssign/CHO restructured and updated
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaGomoryova committed Oct 18, 2024
1 parent 594bd3e commit 712e0f0
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 10 deletions.
63 changes: 56 additions & 7 deletions 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 @@ -94,16 +94,21 @@
help= "Lower limit of molecular mass to be assigned."/>
<param name="highMW" type="float" label="Upper limit of molecular mass to be assigned" value="1000"
help= "Upper limit of molecular mass to be assigned."/>
<section name="advanced" title="Advanced" expanded="false">
</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."/>
<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="Ex" type="integer" label="Amount of Chlorine 37" value="0" help= "Sets the amount of Chlorine 37 to be used in assignment."/>
<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."/>
<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."/>

<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."/>
Expand Down Expand Up @@ -131,6 +136,50 @@
<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" />
</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" />
<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."/>
<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."/>
<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>
</section>
</xml>

Expand Down
58 changes: 57 additions & 1 deletion tools/mfassignr/mfassignr_mfassign.xml
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
#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
4 changes: 2 additions & 2 deletions tools/mfassignr/mfassignr_mfassignCHO.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
SN = $sn_ratio * $kmdn
POEx = 0
NOEx = 0
#if "$assign_typeof_ions"=="yes"
#if $ionMode=="pos"
POEx = 1
Expand Down Expand Up @@ -87,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

0 comments on commit 712e0f0

Please sign in to comment.