Skip to content

Commit

Permalink
odd electron ions assignment based on ionMode
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaGomoryova committed Oct 18, 2024
1 parent 26c445d commit 594bd3e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tools/mfassignr/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@
<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">
<param name="POEx" type="float" label="POEx" value="0"
help= "If set to 1 and ionMode is positive, positive mode odd electron ions can be assigned."/>
<param name="NOEx" type="float" label="NOEx" value="0"
help= "If set to 1 and ionMode is negative, negative mode odd electron ions can be assigned."/>
<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."/>
Expand Down
17 changes: 15 additions & 2 deletions tools/mfassignr/mfassignr_mfassignCHO.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
MF_CHO_assign <- MFAssignR::MFAssignCHO(
peaks = mono,
Expand All @@ -33,8 +46,8 @@
highMW = $highMW,
ppm_err = $ppm_err,
SN = SN,
POEx = $POEx,
NOEx = $NOEx,
POEx = POEx,
NOEx = NOEx,
Ex = $Ex,
Mx = $Mx,
NH4x = $NH4x,
Expand Down

0 comments on commit 594bd3e

Please sign in to comment.