From 468654be4ee49eaef134e41301fc0a9821c373fa Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 09:57:05 +0100 Subject: [PATCH 01/11] Filename fix for purityA output --- tools/msPurity/purityA.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/msPurity/purityA.R b/tools/msPurity/purityA.R index 7fe924b..c4e368b 100644 --- a/tools/msPurity/purityA.R +++ b/tools/msPurity/purityA.R @@ -124,7 +124,7 @@ if (!is.null(opt$galaxy_names)) { print(pa) save(pa, file = file.path(opt$out_dir, "purityA_output.RData")) -pa@puritydf$filename <- sapply(pa@puritydf$fileid, function(x) names(pa@fileList)[as.integer(x)]) +pa@puritydf$filename <- sapply(as.character(pa@puritydf$fileid), function(x) names(pa@fileList)[as.integer(x)]) print(head(pa@puritydf)) write.table(pa@puritydf, file.path(opt$out_dir, "purityA_output.tsv"), row.names = FALSE, sep = "\t") From 21add9b5258d4741921f2e38a397345a3b3e876d Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:01:20 +0100 Subject: [PATCH 02/11] Fix for purityX xset object read --- tools/msPurity/purityX.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/msPurity/purityX.R b/tools/msPurity/purityX.R index 54eb548..8fd6c86 100644 --- a/tools/msPurity/purityX.R +++ b/tools/msPurity/purityX.R @@ -16,7 +16,6 @@ option_list <- list( make_option("--singleFile", default = 0), make_option("--cores", default = 4), make_option("--xgroups", type = "character"), - make_option("--rdata_name", default = "xset"), make_option("--camera_xcms", default = "xset"), make_option("--files", type = "character"), make_option("--galaxy_files", type = "character"), @@ -63,10 +62,10 @@ if (is.null(opt$rtraw_columns)) { rtraw_columns <- TRUE } -loadRData <- function(rdata_path, xset_name) { +loadRData <- function(rdata_path, xnames) { # loads an RData file, and returns the named xset object if it is there load(rdata_path) - return(get(ls()[ls() == xset_name])) + return(get(ls()[ls() %in% xnames])) } @@ -90,7 +89,7 @@ getxcmsSetObject <- function(xobject) { } } -target_obj <- loadRData(opt$xset_path, opt$rdata_name) +target_obj <- loadRData(opt$xset_path, c('xset', 'xa', 'xdata')) if (opt$camera_xcms == "camera") { xset <- target_obj@xcmsSet From c7a3f13a7519821a3822afbb1f0704f0655269c8 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:03:01 +0100 Subject: [PATCH 03/11] Update pr.yaml --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8223785..0519b29 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -35,7 +35,7 @@ jobs: run: echo "GALAXY_HEAD_SHA=$(git ls-remote ${{ env.GALAXY_REPO }} refs/heads/${{ env.GALAXY_RELEASE }} | cut -f1)" >> $GITHUB_ENV - name: Save latest galaxy commit to artifact file run: echo $GALAXY_HEAD_SHA > galaxy.sha - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: Workflow artifacts path: galaxy.sha From c6547a839a299727c08cef4cdf8f7757e651a7da Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:05:59 +0100 Subject: [PATCH 04/11] Update pr.yaml - version bump for upload artifact --- .github/workflows/pr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0519b29..b725938 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -88,7 +88,7 @@ jobs: run: planemo ci_find_repos --changed_in_commit_range $COMMIT_RANGE --exclude packages --exclude deprecated --exclude_from .tt_skip --output changed_repositories.list - name: Show repo list run: cat changed_repositories.list - - uses: actions/upload-artifact@v2.0.1 + - uses: actions/upload-artifact@v4 with: name: Workflow artifacts path: changed_repositories.list @@ -267,7 +267,7 @@ jobs: run: | mkdir upload mv tool_test_output.json tool_test_output.html upload/ - - uses: actions/upload-artifact@v2.0.1 + - uses: actions/upload-artifact@v4 with: name: 'Tool test output ${{ matrix.chunk }}' path: upload @@ -312,7 +312,7 @@ jobs: run: | mkdir upload mv tool_test_output.json tool_test_output.html upload/ - - uses: actions/upload-artifact@v2.0.1 + - uses: actions/upload-artifact@v4 with: name: 'All tool test results' path: upload From fc13455e46c56bbeed2f621259d289986b89d601 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:14:16 +0100 Subject: [PATCH 05/11] Update pr.yaml artifact version bump --- .github/workflows/pr.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b725938..99daa9a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -111,7 +111,7 @@ jobs: - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: Workflow artifacts path: ../workflow_artifacts/ @@ -150,7 +150,7 @@ jobs: - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: Workflow artifacts path: ../workflow_artifacts/ @@ -200,7 +200,7 @@ jobs: - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: Workflow artifacts path: ../workflow_artifacts/ @@ -286,7 +286,7 @@ jobs: # This job runs on Linux runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: path: artifacts - uses: actions/setup-python@v1 @@ -339,7 +339,7 @@ jobs: - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: Workflow artifacts path: ../workflow_artifacts/ From 982f34710e53883393b010001a47190e5cd0534b Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:18:00 +0100 Subject: [PATCH 06/11] Update filterFragSpectra.R - update filenames - ensure as character --- tools/msPurity/filterFragSpectra.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/msPurity/filterFragSpectra.R b/tools/msPurity/filterFragSpectra.R index 58adb08..741c9b0 100644 --- a/tools/msPurity/filterFragSpectra.R +++ b/tools/msPurity/filterFragSpectra.R @@ -93,7 +93,7 @@ if (length(pa) > 0) { # select and reorder columns df_fragments <- df_fragments[, c("grpid", "pid", "precursorScanNum", "acquisitionNum", "fileid", "mz", "i", "snr", "ra", "purity_pass_flag", "intensity_pass_flag", "ra_pass_flag", "snr_pass_flag", "pass_flag")] - pa@grped_df$filename <- sapply(pa@grped_df$fileid, function(x) names(pa@fileList)[as.integer(x)]) + pa@grped_df$filename <- sapply(as.character(pa@grped_df$fileid), function(x) names(pa@fileList)[as.integer(x)]) print(head(pa@grped_df)) write.table(pa@grped_df, opt$out_peaklist_prec, row.names = FALSE, sep = "\t") From 40c7720404f957217e09ae323b3b80b3a84e4e90 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:20:41 +0100 Subject: [PATCH 07/11] Update filterFragSpectra.R - revert - not required --- tools/msPurity/filterFragSpectra.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/msPurity/filterFragSpectra.R b/tools/msPurity/filterFragSpectra.R index 741c9b0..58adb08 100644 --- a/tools/msPurity/filterFragSpectra.R +++ b/tools/msPurity/filterFragSpectra.R @@ -93,7 +93,7 @@ if (length(pa) > 0) { # select and reorder columns df_fragments <- df_fragments[, c("grpid", "pid", "precursorScanNum", "acquisitionNum", "fileid", "mz", "i", "snr", "ra", "purity_pass_flag", "intensity_pass_flag", "ra_pass_flag", "snr_pass_flag", "pass_flag")] - pa@grped_df$filename <- sapply(as.character(pa@grped_df$fileid), function(x) names(pa@fileList)[as.integer(x)]) + pa@grped_df$filename <- sapply(pa@grped_df$fileid, function(x) names(pa@fileList)[as.integer(x)]) print(head(pa@grped_df)) write.table(pa@grped_df, opt$out_peaklist_prec, row.names = FALSE, sep = "\t") From a8caf71ce44092fab3488d6627d8f4a26c28ab42 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:29:40 +0100 Subject: [PATCH 08/11] Update pr.yaml - version bump actions --- .github/workflows/pr.yaml | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 99daa9a..b1d48ba 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -35,18 +35,18 @@ jobs: run: echo "GALAXY_HEAD_SHA=$(git ls-remote ${{ env.GALAXY_REPO }} refs/heads/${{ env.GALAXY_RELEASE }} | cut -f1)" >> $GITHUB_ENV - name: Save latest galaxy commit to artifact file run: echo $GALAXY_HEAD_SHA > galaxy.sha - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: Workflow artifacts path: galaxy.sha - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-pip with: path: ~/.cache/pip key: pip_cache_py_${{ matrix.python-version }}_gxy1_$GALAXY_HEAD_SHA - name: Cache .planemo - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-planemo with: path: ~/.planemo @@ -63,7 +63,7 @@ jobs: run: | touch tool.xml PIP_QUIET=2 planemo test --galaxy_python_version ${{ matrix.python-version }} --no_conda_auto_init --galaxy_source $GALAXY_REPO --galaxy_branch $GALAXY_RELEASE - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # The range of commits to check for changes is: @@ -88,7 +88,7 @@ jobs: run: planemo ci_find_repos --changed_in_commit_range $COMMIT_RANGE --exclude packages --exclude deprecated --exclude_from .tt_skip --output changed_repositories.list - name: Show repo list run: cat changed_repositories.list - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: Workflow artifacts path: changed_repositories.list @@ -105,20 +105,20 @@ jobs: steps: # checkout the repository # and use it as the current working directory - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: Workflow artifacts path: ../workflow_artifacts/ - name: Determine latest galaxy commit run: echo "GALAXY_HEAD_SHA=$(cat ../workflow_artifacts/galaxy.sha)" >> $GITHUB_ENV - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-pip with: path: ~/.cache/pip @@ -144,20 +144,20 @@ jobs: steps: # checkout the repository to master # and use it as the current working directory - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: Workflow artifacts path: ../workflow_artifacts/ - name: Determine latest galaxy commit run: echo "GALAXY_HEAD_SHA=$(cat ../workflow_artifacts/galaxy.sha)" >> $GITHUB_ENV - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-pip with: path: ~/.cache/pip @@ -200,7 +200,7 @@ jobs: - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: Workflow artifacts path: ../workflow_artifacts/ @@ -267,7 +267,7 @@ jobs: run: | mkdir upload mv tool_test_output.json tool_test_output.html upload/ - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: 'Tool test output ${{ matrix.chunk }}' path: upload @@ -286,7 +286,7 @@ jobs: # This job runs on Linux runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: path: artifacts - uses: actions/setup-python@v1 @@ -295,7 +295,7 @@ jobs: - name: Determine latest galaxy commit run: echo "GALAXY_HEAD_SHA=$(cat ../workflow_artifacts/galaxy.sha)" >> $GITHUB_ENV - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-pip with: path: ~/.cache/pip @@ -312,7 +312,7 @@ jobs: run: | mkdir upload mv tool_test_output.json tool_test_output.html upload/ - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: 'All tool test results' path: upload @@ -333,20 +333,20 @@ jobs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' && github.repository_owner == 'computational-metabolomics' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: Workflow artifacts path: ../workflow_artifacts/ - name: Determine latest galaxy commit run: echo "GALAXY_HEAD_SHA=$(cat ../workflow_artifacts/galaxy.sha)" >> $GITHUB_ENV - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-pip with: path: ~/.cache/pip From 4f0fcbd85e6c85a1fe9cbaa07ceea0fd48e853d6 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Fri, 13 Sep 2024 10:51:39 +0100 Subject: [PATCH 09/11] Update purityX.xml - update xml wrapper to remove ref to xcms object name --- tools/msPurity/purityX.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/msPurity/purityX.xml b/tools/msPurity/purityX.xml index 00e129a..403d870 100644 --- a/tools/msPurity/purityX.xml +++ b/tools/msPurity/purityX.xml @@ -18,11 +18,7 @@ --xgroups='$xgroups.xgroups_value' #end if --camera_xcms=$camera_xcms - #if $camera_xcms == "camera" - --rdata_name=xa - #else - --rdata_name=xset - #end if + --iwNorm=$iw_norm --ilim=$ilim #if $isotopes.isotopes == "exclude_default" From 9f07c370d7d4660fd66fe1b7439c41ca995061af Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Fri, 13 Sep 2024 12:03:49 +0100 Subject: [PATCH 10/11] clean up --- README.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 4125801..6093408 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,13 @@ msPurity for Galaxy |Git| |Bioconda| |License| -Version v1.28.0+galaxy0 +Version v1.28.0+galaxy1 ------------------------ - msPurity - bioconductor-mspurity v1.28.0 - Galaxy tools - - v0 + - v1 About ------ @@ -52,6 +52,10 @@ Authors, contributors & contacts Changes ------------------------- +v1.28.0-galaxy1 + - Further fix for purityX galaxy tool (https://github.com/computational-metabolomics/mspurity-galaxy/issues/53) + - Fix for purityA file naming (https://github.com/computational-metabolomics/mspurity-galaxy/issues/56) + v1.28.0-galaxy0 - Version bump to v1.28.0 - createMSP now uses the median precursor MZ and precursor RT in the MSP files From 5aeddc0db36fd5b5f3d9a93fcbd758b8ec6bb8dc Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Fri, 13 Sep 2024 13:45:42 +0100 Subject: [PATCH 11/11] version bump and doc update --- tools/msPurity/macros.xml | 2 +- tools/msPurity/purityX.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/msPurity/macros.xml b/tools/msPurity/macros.xml index 3d41a6d..ec891d1 100644 --- a/tools/msPurity/macros.xml +++ b/tools/msPurity/macros.xml @@ -1,7 +1,7 @@ 1.28.0 - 0 + 1 diff --git a/tools/msPurity/purityX.xml b/tools/msPurity/purityX.xml index 403d870..fad5564 100644 --- a/tools/msPurity/purityX.xml +++ b/tools/msPurity/purityX.xml @@ -117,10 +117,10 @@ + help="[Deprecated] No longer applicable. Previously when obiwarp was used + the retention time correction tracking was slightly different to the other correction methods. To ensure + correct tracking with obiwarp an additional tool (track_rt_raw) was performed prior to + any retention time correction - and this was then checked when this flag was turned on"/>