diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 0000000..74ec7b0 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} diff --git a/DESCRIPTION b/DESCRIPTION index 712baae..ae4fb8d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: hagis Title: Analysis of Plant Pathogen Pathotype Complexities, Distributions and Diversity -Version: 3.1.11.9000 +Version: 3.1.12 Authors@R: c( person("Austin G.", "McCoy", , "mccoyaus@msu.edu", role = c("aut", "ccp"), comment = c(ORCID = "0000-0003-2483-4184")), @@ -11,6 +11,8 @@ Authors@R: c( comment = c(ORCID = "0000-0002-0061-8359")), person("Martin", "Chilvers", , "chilvers@msu.edu", role = c("aut", "ths"), comment = c(ORCID = "0000-0001-8832-1666")), + person("Jari", "Oksanen", , "jhoksane@gmail.com", role = "aut", + comment = "Contributed patch to update betadiversity vignette and fixed bug therein as well."), person("Zhian N.", "Kamvar", role = c("ctb", "rev"), comment = c(ORCID = "0000-0003-1458-7108")), person("Michigan Soybean Promotion Committee", role = "fnd"), @@ -43,16 +45,14 @@ Suggests: knitr, rmarkdown, roxyglobals, + roxyglobals, testthat, vdiffr, vegan VignetteBuilder: knitr -Config/roxyglobals/filename: globals.R -Config/roxyglobals/unique: FALSE Encoding: UTF-8 Language: en-US -LazyData: true Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "roxyglobals::global_roclet")) RoxygenNote: 7.3.1 diff --git a/codemeta.json b/codemeta.json index b578014..48bfc92 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/openplantpathology/hagis", "issueTracker": "https://github.com/openplantpathology/hagis/issues", "license": "https://spdx.org/licenses/MIT", - "version": "3.1.11.9000", + "version": "3.1.12", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -49,6 +49,12 @@ "familyName": "Chilvers", "email": "chilvers@msu.edu", "@id": "https://orcid.org/0000-0001-8832-1666" + }, + { + "@type": "Person", + "givenName": "Jari", + "familyName": "Oksanen", + "email": "jhoksane@gmail.com" } ], "contributor": [ @@ -154,6 +160,18 @@ }, "sameAs": "https://CRAN.R-project.org/package=roxyglobals" }, + { + "@type": "SoftwareApplication", + "identifier": "roxyglobals", + "name": "roxyglobals", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=roxyglobals" + }, { "@type": "SoftwareApplication", "identifier": "testthat", @@ -249,7 +267,7 @@ "applicationCategory": "Tools", "isPartOf": "https://openplantpathology.org", "keywords": ["plant-pathology", "pathotype", "pathogen-survey", "virulenceanalysis", "differentialset", "assessmentscale", "plant-disease", "pathotype-complexities", "population-diversities"], - "fileSize": "294.779KB", + "fileSize": "295.986KB", "citation": [ { "@type": "ScholarlyArticle", @@ -320,13 +338,13 @@ "name": "{hagis}: Analysis of Plant Pathogen Pathotype Complexities, Distributions and Diversity", "identifier": "10.5281/zenodo.2619820", "url": "https://openplantpathology.github.io/hagis/", - "description": "R package version 3.1.11.9000", + "description": "R package version 3.1.12", "@id": "https://doi.org/10.5281/zenodo.2619820", "sameAs": "https://doi.org/10.5281/zenodo.2619820" } ], "releaseNotes": "https://github.com/openplantpathology/hagis/blob/master/NEWS.md", "readme": "https://github.com/openplantpathology/hagis/blob/main/README.md", - "contIntegration": ["https://app.codecov.io/gh/openplantpathology/hagis", "https://github.com/openplantpathology/hagis/actions/workflows/test-coverage.yaml"], + "contIntegration": ["https://codecov.io/gh/openplantpathology/hagis", "https://github.com/openplantpathology/hagis/actions/workflows/test-coverage.yaml"], "developmentStatus": "https://www.repostatus.org/#active" } diff --git a/man/hagis-package.Rd b/man/hagis-package.Rd index 2925eea..1af20e4 100644 --- a/man/hagis-package.Rd +++ b/man/hagis-package.Rd @@ -25,6 +25,7 @@ Authors: \item Austin G. McCoy \email{mccoyaus@msu.edu} (\href{https://orcid.org/0000-0003-2483-4184}{ORCID}) [conceptor] \item Zachary Noel \email{noelzach@msu.edu} (\href{https://orcid.org/0000-0001-6375-8300}{ORCID}) [conceptor] \item Martin Chilvers \email{chilvers@msu.edu} (\href{https://orcid.org/0000-0001-8832-1666}{ORCID}) [thesis advisor] + \item Jari Oksanen \email{jhoksane@gmail.com} (Contributed patch to update betadiversity vignette and fixed bug therein as well.) } Other contributors: diff --git a/vignettes/betadiversity.Rmd b/vignettes/betadiversity.Rmd index 894f6ba..2801cd5 100644 --- a/vignettes/betadiversity.Rmd +++ b/vignettes/betadiversity.Rmd @@ -166,8 +166,7 @@ ggplot(data = princoor.pathotype.data, aes(x = X, y = Y)) + legend.text = element_text(face = "bold", size = 10), legend.key.size = unit(1, 'lines') ) + - stat_ellipse(data = princoor.pathotype.data, aes(x = X, y = Y), - level = 0.95) + + stat_ellipse(data = princoor.pathotype.data, aes(x = X, y = Y), level = 0.95) + ggtitle("Pathotype Jaccard Distances PCOA") ``` diff --git a/vignettes/hagis.Rmd b/vignettes/hagis.Rmd index 6b68e2f..ac8f588 100644 --- a/vignettes/hagis.Rmd +++ b/vignettes/hagis.Rmd @@ -31,7 +31,7 @@ library("hagis") head(P_sojae_survey) ``` -We see in the `gene` column that each gene is prepended with "Rps". +We see in the `gene` column that each gene is pre-pended with "Rps". We can remove this to make the graphs cleaner and report the genes in tables as we would in a manuscript. Note that this will work for any string you enter as the first value, `pattern`. The second string, `replacement`, is the replacement value, the third, `x`, is where to look and make the changes. @@ -266,8 +266,7 @@ Set the font to be a bold-face serif family font. ```{r change-plot-font} Rps.plot <- Rps.plot + - theme(text = element_text(face = "bold", - family = "serif")) + theme(text = element_text(face = "bold", family = "serif")) Rps.plot ``` @@ -289,12 +288,9 @@ You can use named, *e.g.*, "red", "yellow", "blue", colors in R or you can use c Illustrated below is using Michigan State University (MSU) Green, hex code #18453b, using `theme_bw()` with a serif font. ```{r use-Colors} -autoplot(Rps.summary, - type = "percentage", - color = "#18453b") + +autoplot(Rps.summary, type = "percentage", color = "#18453b") + theme_bw() + - theme(text = element_text(face = "bold", - family = "serif")) + theme(text = element_text(face = "bold", family = "serif")) ``` ### Sorting the x-axis @@ -302,11 +298,12 @@ autoplot(Rps.summary, You can sort the x-axis of any graph produced using `autoplot()` in an `ascending` or `descending` order using the `order` parameter in `autoplot()`. ```{r sort-axis} -autoplot(Rps.summary, - type = "percentage", - color = "#18453b", - order = "ascending") + +autoplot( + Rps.summary, + type = "percentage", + color = "#18453b", + order = "ascending" +) + theme_bw() + - theme(text = element_text(face = "bold", - family = "serif")) + theme(text = element_text(face = "bold", family = "serif")) ```