Skip to content

Commit

Permalink
fix for purityx Rdata
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomnl committed Jun 12, 2024
1 parent 8ba5d6c commit 0e32a53
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
4 changes: 3 additions & 1 deletion tools/msPurity/purityX.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ ppLCMS <- msPurity::purityX(
dfp <- ppLCMS@predictions

# to make compatable with deconrank
colnames(dfp)[colnames(dfp) == "grpid"] <- "peakID"
# (keep grpid for other compatibility)
dfp <- data.frame("peakID"=dfp$grpid, dfp)

colnames(dfp)[colnames(dfp) == "median"] <- "medianPurity"
colnames(dfp)[colnames(dfp) == "mean"] <- "meanPurity"
colnames(dfp)[colnames(dfp) == "sd"] <- "sdPurity"
Expand Down
14 changes: 8 additions & 6 deletions tools/msPurity/purityX.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<data name="purityX_tsv" format="tsv" label="${tool.name} on ${on_string}: tsv"
from_work_dir="purityX_output.tsv" />
<data name="purityX_rdata" format="rdata" label="${tool.name} on ${on_string}: RData"
from_work_dir="purityX_output.rdata" />
from_work_dir="purityX_output.RData" />
</outputs>
<tests>
<test>
Expand Down Expand Up @@ -177,18 +177,20 @@ Output consists of the mz and intensity of the XCMS features (id based on the XC
metrics regarding the anticipated precursor ion purity.
============= ============= ============= ================ ================ ================ ================ ================ ================
grpid mean median sd stde RSD pknm i mz
grpid meanPurity medianPurity sdPurity stdePurity cvPurity pknmPurity i mz
============= ============= ============= ================ ================ ================ ================ ================ ================
1 1.00 1.00 0.0000 0.0000 0.0000 1 5404920 100.0758
1 1.00 1.00 0.0000 0.0000 0.0000 1 5404920 100.0758
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
2 0.59 0.57 0.3016 0.1508 50.570 3 8793845 101.0084
2 0.59 0.57 0.3016 0.1508 50.570 3 8793845 101.0084
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
3 0.08 0.07 0.0784 0.0164 29.643 4 1526502 100.9781
3 0.08 0.07 0.0784 0.0164 29.643 4 1526502 100.9781
------------- ------------- ------------- ---------------- ---------------- ---------------- ---------------- ---------------- ----------------
4 1.00 1.00 0.0000 0.0000 0.0000 1 42513139 102.0914
4 1.00 1.00 0.0000 0.0000 0.0000 1 42513139 102.0914
============= ============= ============= ================ ================ ================ ================ ================ ================
(Note - the additional peakID column is the same as grpid. Included for compatibility with other Galaxy tools)
]]></help>
<expand macro="citations" />
Expand Down
Binary file added tools/msPurity/test-data/purityX_output.RData
Binary file not shown.
Empty file.
32 changes: 16 additions & 16 deletions tools/msPurity/test-data/purityX_output.tsv
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"peakID" "meanPurity" "medianPurity" "sdPurity" "sdePurity" "cvPurity" "pknmPurity" "i" "mz"
1 1 1 0 0 0 1 61925043.3566382 102.091560881174
2 1 1 0 0 0 1 25719001.4822415 103.054435681307
3 1 1 0 0 0 1 3791623.64689146 103.094714179046
4 1 1 0 0 0 1 701844279.87476 104.107044269271
5 0.753862395887935 1 0.49227520822413 0.246137604112065 65.3004064016622 1 79111202.7215235 105.051698129502
6 0.849777173964078 0.846538530688927 0.0251183222605269 0.0125591611302635 2.95587161318465 2 5735625.74118929 106.062931911485
7 0.846273037079121 0.84212559075998 0.0578505242577427 0.0289252621288714 6.83591721856241 2.25 2124533.28227443 107.050950030548
8 1 1 0 0 0 1 1965138.01789635 108.006429726299
9 1 1 0 0 0 1 362848.770317471 108.055140508271
10 1 1 0 0 0 1 25053032.2987587 110.071444659587
11 0.657159557553984 0.66469615675609 0.396069303079897 0.198034651539948 60.269884007182 3 8168571.28564153 111.020205687498
12 0.986752431352875 0.987973697141727 0.0154264299310987 0.00771321496554933 1.56335362761138 1.25 21655562.9118763 112.043935634745
13 0.969931320369093 0.973488648484343 0.035202929071034 0.017601464535517 3.6294249223376 1.5 16160213.3493717 112.923083776231
14 1 1 0 0 0 1 82880594.6142923 113.035283604395
15 0.613847507731082 0.613847507731082 0.00533923101597845 0.0037754064577199 0.869797620538273 4 3386134.01927015 114.037770729384
"peakID" "grpid" "meanPurity" "medianPurity" "sdPurity" "sdePurity" "cvPurity" "pknmPurity" "i" "mz"
1 1 1 1 0 0 0 1 61925043.3566382 102.091560881174
2 2 1 1 0 0 0 1 25719001.4822415 103.054435681307
3 3 1 1 0 0 0 1 3791623.64689146 103.094714179046
4 4 1 1 0 0 0 1 701844279.87476 104.107044269271
5 5 0.753862395887935 1 0.49227520822413 0.246137604112065 65.3004064016622 1 79111202.7215235 105.051698129502
6 6 0.849777173964078 0.846538530688927 0.0251183222605269 0.0125591611302635 2.95587161318465 2 5735625.74118929 106.062931911485
7 7 0.846273037079121 0.84212559075998 0.0578505242577427 0.0289252621288714 6.83591721856241 2.25 2124533.28227443 107.050950030548
8 8 1 1 0 0 0 1 1965138.01789635 108.006429726299
9 9 1 1 0 0 0 1 362848.770317471 108.055140508271
10 10 1 1 0 0 0 1 25053032.2987587 110.071444659587
11 11 0.657159557553984 0.66469615675609 0.396069303079897 0.198034651539948 60.269884007182 3 8168571.28564153 111.020205687498
12 12 0.986752431352875 0.987973697141727 0.0154264299310987 0.00771321496554933 1.56335362761138 1.25 21655562.9118763 112.043935634745
13 13 0.969931320369093 0.973488648484343 0.035202929071034 0.017601464535517 3.6294249223376 1.5 16160213.3493717 112.923083776231
14 14 1 1 0 0 0 1 82880594.6142923 113.035283604395
15 15 0.613847507731082 0.613847507731082 0.00533923101597845 0.0037754064577199 0.869797620538273 4 3386134.01927015 114.037770729384

0 comments on commit 0e32a53

Please sign in to comment.