Skip to content

Commit

Permalink
feat: add clean raw counts template (#79)
Browse files Browse the repository at this point in the history
this is a merge commit
  • Loading branch information
kelly-sovacool authored Dec 30, 2024
2 parents b06c9af + b35cc4d commit d2bbb31
Show file tree
Hide file tree
Showing 35 changed files with 937 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: auto-format

on:
workflow_dispatch:
pull_request:

env:
GH_TOKEN: ${{ github.token }}

jobs:
auto-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.
needs: Suggests

- name: render README.Rmd
shell: Rscript {0}
run: |
rmarkdown::render("README.Rmd")
if (file.exists("README.html")) file.remove("README.html")
- name: update CITATION.cff
shell: Rscript {0}
run: |
# Customize with your own code
# See https://docs.ropensci.org/cffr/articles/cffr.html
# Write your own keys
mykeys <- list()
# Create your CITATION.cff file
cffr::cff_write(keys = mykeys)
- name: format
uses: pre-commit/[email protected]
continue-on-error: true

- name: commit & push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "ci: 🤖 auto-format" && git push || echo "nothing to commit"
63 changes: 0 additions & 63 deletions .github/workflows/update-citation-cff.yaml

This file was deleted.

50 changes: 50 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,18 @@ references:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2024'
- type: software
title: stringr
abstract: 'stringr: Simple, Consistent Wrappers for Common String Operations'
notes: Imports
url: https://stringr.tidyverse.org
repository: https://CRAN.R-project.org/package=stringr
authors:
- family-names: Wickham
given-names: Hadley
email: [email protected]
year: '2024'
doi: 10.32614/CRAN.package.stringr
- type: software
title: tibble
abstract: 'tibble: Simple Data Frames'
Expand Down Expand Up @@ -406,6 +418,31 @@ references:
email: [email protected]
year: '2024'
doi: 10.32614/CRAN.package.tidyselect
- type: software
title: cffr
abstract: 'cffr: Generate Citation File Format (''cff'') Metadata for R Packages'
notes: Suggests
url: https://docs.ropensci.org/cffr/
repository: https://CRAN.R-project.org/package=cffr
authors:
- family-names: Hernangómez
given-names: Diego
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
year: '2024'
doi: 10.32614/CRAN.package.cffr
- type: software
title: docopt
abstract: 'docopt: Command-Line Interface Specification Language'
notes: Suggests
url: https://github.com/docopt/docopt.R
repository: https://CRAN.R-project.org/package=docopt
authors:
- family-names: Jonge
given-names: Edwin
name-particle: de
year: '2024'
doi: 10.32614/CRAN.package.docopt
- type: software
title: glue
abstract: 'glue: Interpreted String Literals'
Expand Down Expand Up @@ -592,3 +629,16 @@ references:
orcid: https://orcid.org/0000-0002-7840-692X
year: '2024'
doi: 10.32614/CRAN.package.usethis
- type: software
title: V8
abstract: 'V8: Embedded JavaScript and WebAssembly Engine for R'
notes: Suggests
url: https://jeroen.r-universe.dev/V8
repository: https://CRAN.R-project.org/package=V8
authors:
- family-names: Ooms
given-names: Jeroen
email: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
year: '2024'
doi: 10.32614/CRAN.package.V8
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ Imports:
rlang,
S7,
stats,
stringr,
tibble,
tidyr,
tidyselect
Suggests:
cffr,
docopt,
glue,
knitr,
lobstr,
Expand All @@ -46,7 +49,8 @@ Suggests:
scales,
styler,
testthat (>= 3.0.0),
usethis
usethis,
V8
VignetteBuilder:
knitr
biocViews:
Expand Down
1 change: 1 addition & 0 deletions MOSuite.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 8ebbd9db-482e-4f6c-a523-b56383cc5b59

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

export("%>%")
export(calc_cpm)
export(clean_raw_counts)
export(create_multiOmicDataSet_from_dataframes)
export(create_multiOmicDataSet_from_files)
export(filter_counts)
export(meta_tbl_to_dat)
export(plot_read_depth)
export(run_deseq2)
export(strip_ensembl_version)
if (getRversion() < "4.3.0") importFrom("S7", "@")
importFrom(DESeq2,DESeq)
importFrom(dplyr,"%>%")
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ This is the first release of MOSuite 🎉
- `run_deseq2()`
- `calc_cpm()` (#38, @kelly-sovacool)
- `filter_counts()` (#38, @kelly-sovacool)
- `clean_raw_counts()` (#79, @kelly-sovacool)
2 changes: 1 addition & 1 deletion R/0_mo-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ multiOmicDataSet <- S7::new_class("multiOmicDataSet",
},
validator = function(self) {
# counts must only contain approved names
approved_counts <- c("raw", "cpm", "filt")
approved_counts <- c("raw", "clean", "cpm", "filt")
if (!all(names(self@counts) %in% approved_counts)) {
stop(glue::glue("counts can only contain data frames with these names:\n\t{paste(approved_counts, collapse = ', ')}"))
}
Expand Down
Loading

0 comments on commit d2bbb31

Please sign in to comment.