From 46d5c21aa86a84f30b15d6a572ea6417a18d4881 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 22 Feb 2023 12:34:18 +0100 Subject: [PATCH 1/2] Fix kraken2tax requirements and add test --- .tt_skip | 1 - .../taxonomy/kraken2tax/kraken2tax.xml | 6 +- .../kraken2tax/test-data/kraken2tax-test1.txt | 3416 +---------------- .../kraken2tax/test-data/kraken2tax.txt | 3414 ---------------- .../test-data/ncbi_taxonomy.loc.test | 2 + .../kraken2tax/test-data/tax_dir/names.dmp | 20 + .../kraken2tax/test-data/tax_dir/nodes.dmp | 4 + .../kraken2tax/tool_data_table_conf.xml.test | 8 + 8 files changed, 38 insertions(+), 6833 deletions(-) create mode 100644 tool_collections/taxonomy/kraken2tax/test-data/ncbi_taxonomy.loc.test create mode 100644 tool_collections/taxonomy/kraken2tax/test-data/tax_dir/names.dmp create mode 100644 tool_collections/taxonomy/kraken2tax/test-data/tax_dir/nodes.dmp create mode 100644 tool_collections/taxonomy/kraken2tax/tool_data_table_conf.xml.test diff --git a/.tt_skip b/.tt_skip index 36f46e4ea..d56b6532f 100644 --- a/.tt_skip +++ b/.tt_skip @@ -4,7 +4,6 @@ tool_collections/hgv/hgv_hilbertvis tool_collections/hgv/snpfreq tool_collections/taxonomy/find_diag_hits tool_collections/taxonomy/gi2taxonomy -tool_collections/taxonomy/kraken2tax tool_collections/taxonomy/lca_wrapper tool_collections/taxonomy/poisson2test tool_collections/taxonomy/t2ps diff --git a/tool_collections/taxonomy/kraken2tax/kraken2tax.xml b/tool_collections/taxonomy/kraken2tax/kraken2tax.xml index f3f0e59f0..60cdd392e 100644 --- a/tool_collections/taxonomy/kraken2tax/kraken2tax.xml +++ b/tool_collections/taxonomy/kraken2tax/kraken2tax.xml @@ -1,8 +1,8 @@ - + data to Galaxy taxonomy representation - gawk - gb_taxonomy_tools + gawk + gb_taxonomy_tools | scientific name | +2 | Monera | Monera | in-part | +2 | Procaryotae | Procaryotae | in-part | +2 | Prokaryota | Prokaryota | in-part | +2 | Prokaryotae | Prokaryotae | in-part | +2 | bacteria | bacteria | blast name | +2 | eubacteria | | genbank common name | +2 | not Bacteria Haeckel 1894 | | synonym | +2 | prokaryote | prokaryote | in-part | +2 | prokaryotes | prokaryotes | in-part | +6 | Azorhizobium | | scientific name | +6 | Azorhizobium Dreyfus et al. 1988 emend. Lang et al. 2013 | | authority | +6 | Azotirhizobium | | misspelling | +7 | ATCC 43989 | | type material | +7 | Azorhizobium caulinodans | | scientific name | +7 | Azorhizobium caulinodans Dreyfus et al. 1988 | | synonym | +7 | Azotirhizobium caulinodans | | equivalent name | +7 | CCUG 26647 | | type material | diff --git a/tool_collections/taxonomy/kraken2tax/test-data/tax_dir/nodes.dmp b/tool_collections/taxonomy/kraken2tax/test-data/tax_dir/nodes.dmp new file mode 100644 index 000000000..6baf20e2e --- /dev/null +++ b/tool_collections/taxonomy/kraken2tax/test-data/tax_dir/nodes.dmp @@ -0,0 +1,4 @@ +1 | 1 | no rank | | 8 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | +2 | 2 | superkingdom | | 0 | 0 | 11 | 0 | 0 | 0 | 0 | 0 | | +6 | 6 | genus | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | | +7 | 7 | species | AC | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | | diff --git a/tool_collections/taxonomy/kraken2tax/tool_data_table_conf.xml.test b/tool_collections/taxonomy/kraken2tax/tool_data_table_conf.xml.test new file mode 100644 index 000000000..b1c7102df --- /dev/null +++ b/tool_collections/taxonomy/kraken2tax/tool_data_table_conf.xml.test @@ -0,0 +1,8 @@ + + + + + value, name, path + +
+
From 8ce2585b80c9dd44080e38b92f735e740b0c19d6 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 22 Feb 2023 13:08:59 +0100 Subject: [PATCH 2/2] Update lintr step --- .github/workflows/pr.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 2ee474724..2f704e0e7 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -164,16 +164,16 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - r-version: ['4.0.1'] + r-version: ['release'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.r-version }} - name: Cache R packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ env.R_LIBS_USER }} key: r_cache_${{ matrix.os }}_${{ matrix.r-version }} @@ -189,7 +189,7 @@ jobs: - name: lintr run: | library(lintr) - linters <- with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL) + linters <- linters_with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL) con <- file("repository_list.txt", "r") status <- 0 while (TRUE) { @@ -202,8 +202,8 @@ jobs: status <- 1 for (l in lnt) { rel_path <- paste(repo, l$filename, sep="/") - write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message), stderr()) - write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message), "rlint_report.txt", append=TRUE) + write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message, paste("(", l$line, ")")), stderr()) + write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message, paste("(", l$line, ")")), "rlint_report.txt", append=TRUE) } } }