Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #25

Merged
merged 12 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
^renv$
^renv\.lock$
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^README.Rmd
^\.travis\.yml$
^\.Rproj\.user$
^\.github$
^\.travis\.yml$
^_pkgdown\.yml$
^data-raw
^docs$
^pkgdown$
^data-raw
^renv$
^renv\.lock$
^codemeta\.json$
10 changes: 5 additions & 5 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (interactive()) {
if (file.exists("~/.Rprofile")) {
source("~/.Rprofile")
}
r_profile <- file.path(Sys.getenv("HOME"), ".Rprofile")

if (interactive() && file.exists(r_profile)) {
source(r_profile) # nolint: undesirable_function_linter.
}

source("renv/activate.R")
source("renv/activate.R") # nolint: undesirable_function_linter.
33 changes: 0 additions & 33 deletions .github/workflows/R-CMD-check.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: install-r

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

- uses: r-lib/actions/setup-tinytex@v1

- name: Install pak and query dependencies
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: rworkflows
on:
workflow_dispatch:
push:
branches:
- master
- main
- devel
- RELEASE_**
pull_request:
branches:
- master
- main
- devel
- RELEASE_**
jobs:
rworkflows:
permissions:
contents: write
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: bioconductor/bioconductor_docker:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/latest/release
- os: macOS-latest
bioc: release
r: auto
- os: windows-latest
bioc: release
r: auto
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ true }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ true }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ true }}
run_pkgdown: ${{ true }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
12 changes: 12 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
linters: linters_with_tags(
tags = c("default", "style", "misc", "potential-bug", "performance", "documentation", "risky", "package_development"),
line_length_linter(length = 80L),
indentation_linter(indent = 4L, hanging_indent_style = "never"),
undesirable_function_linter(modify_defaults(
defaults = default_undesirable_functions, library = NULL)),
object_usage_linter = NULL,
object_name_linter(styles = c("camelCase")))
encoding: "UTF-8"
exclusions: list(
"renv/activate.R",
"doc/")
127 changes: 127 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# All available hooks: https://pre-commit.com/hooks.html
# R specific hooks: https://github.com/lorenzwalthert/precommit
exclude: '.*\.(csv|tsv|xls)$'
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.2
hooks:
- id: use-tidy-description
- id: codemeta-description-updated
- id: spell-check
exclude: >
(?x)^(
.*\.[rR]|
.*\.feather|
.*\.jpeg|
.*\.pdf|
.*\.png|
.*\.py|
.*\.RData|
.*\.rd(s|a)|
.*\.Rd(s|a)|
.*\.RD(S|A)|
.*\.Rproj|
.*\.sh|
(.*/|)\.gitignore|
(.*/|)\.gitlab-ci\.yml|
(.*/|)\.lintr|
(.*/|)\.pre-commit-.*|
(.*/|)\.Rbuildignore|
(.*/|)\.Renviron|
(.*/|)\.Rprofile|
(.*/|)\.travis\.yml|
(.*/|)appveyor\.yml|
(.*/|)NAMESPACE|
(.*/|)renv/settings\.dcf|
(.*/|)renv\.lock|
(.*/|)WORDLIST|
\.github/workflows/.*|
data/.*|
.*\.(gz|xz|bz2)|
)$
- id: readme-rmd-rendered
- id: parsable-R
- id: no-browser-statement
- id: no-debug-statement
- id: deps-in-desc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ['--maxkb=500']
- id: file-contents-sorter
files: '^\.Rbuildignore$'
- id: end-of-file-fixer
exclude: '\.Rd'
- id: check-json
- id: check-merge-conflict
- id: mixed-line-ending
args:
- --fix=no
- id: trailing-whitespace
- id: no-commit-to-branch
args:
- --branch
- devel
- --branch
- RELEASE.*
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- args:
- build
- chore
- ci
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
- bump
id: conventional-pre-commit
stages:
- commit-msg
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
exclude: '.*\.[xls|tsv]$'
- id: remove-tabs
exclude: '.*\.[xls|tsv]$'
- repo: local
hooks:
- id: style_files
name: Apply bioconductor style
entry: >
Rscript --vanilla -e "styler::style_pkg(transformers = styler::tidyverse_style(indent_by = 4))"
language: system
- id: lint_files
name: Apply lintr
entry: >
Rscript --vanilla -e "lintr::lint_package()"
language: system
- id: forbid-to-commit
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
language: fail
files: '\.(Rhistory|RData|Rds|rds)$'
- id: codemeta-json-updated
name: Update codemeta.json
entry: >
Rscript --vanilla -e "codemetar::write_codemeta()"
language: system
files: DESCRIPTION
stages: [commit]
- id: bump-version
name: Bump version
entry: >
./utilities/bump-version.sh
language: system
always_run: true
pass_filenames: false
stages: [post-commit]
35 changes: 21 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
Package: KRSA
Type: Package
Title: KRSA: Kinome Random Sampling Analyzer
Version: 1.0.0.9000
Author: Khaled Alganem
Maintainer: Khaled Alganem <[email protected]>
Description: KRSA: Kinome Random Sampling Analyzer
This package aims to pre-process and analyze PamChip array data. From reading bionavigator crosstab view files to generating network models on kinome data.
Version: 1.99.0
Date: 2023-10-10
Authors@R:
c(person(c("Ali", "Sajid"), "Imami", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3684-3539")),
person("Khaled", "Alganem", "[email protected]" ,role = "aut", comment = c(ORCID = "0000-0003-4419-3708")))
Description: The goal of this package is to analyze the PamChip data and identify the changes in the active kinome.
The package can preprocess the PamChip data output from BioNavigator and use Random Sampling and Permutation Analysis
to identify upstream kinases. Additionally, this package provides a set of useful visualizations for the PamChip data.
License: MIT + file LICENSE
URL: https://github.com/CogDisResLab/KRSA
Encoding: UTF-8
Imports:
Imports:
magrittr,
tibble,
readr,
Expand All @@ -27,15 +31,18 @@ Imports:
ggsignif,
httr,
jsonlite
Depends:
R (>= 3.5.0)
LazyData: true
RoxygenNote: 7.2.1
Suggests:
Depends:
R (>= 4.3.0)
Suggests:
knitr,
rmarkdown,
markdown,
tidyverse,
gt,
furrr
VignetteBuilder: knitr
furrr,
biocthis,
usethis
BugReports: https://support.bioconductor.org/tag/KRSA
biocViews: Software
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2021
COPYRIGHT HOLDER: KRSA authors
YEAR: 2020
COPYRIGHT HOLDER: Cognitive Disorders Research Lab
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2021 KRSA authors
Copyright (c) 2020 Cognitive Disorders Research Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 0 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,3 @@
#' }
#'
"ptk_pamchip_86402_mapping"



1 change: 0 additions & 1 deletion R/enrichr_lib_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ process_output <- function(x) {
x

}

10 changes: 4 additions & 6 deletions R/krsa_ce_output_kinases.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
#'

krsa_ce_output_kinases <- function(krsa_table, file_name) {

krsa_table %>%
dplyr::select(Kinase, Z) %>%
dplyr::rename(Score = Z) %>%
readr::write_delim(file=file_name)

krsa_table %>%
dplyr::select(Kinase, Z) %>%
dplyr::rename(Score = Z) %>%
readr::write_delim(file = file_name)
}
10 changes: 4 additions & 6 deletions R/krsa_ce_output_peptides.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
#'

krsa_ce_output_peptides <- function(peptide_table, metric, file_name) {

peptide_table %>%
dplyr::select(Peptide, {{ metric }}) %>%
dplyr::rename(Score = {{ metric }}) %>%
readr::write_delim(file=file_name)

peptide_table %>%
dplyr::select(Peptide, {{ metric }}) %>%
dplyr::rename(Score = {{ metric }}) %>%
readr::write_delim(file = file_name)
}
1 change: 0 additions & 1 deletion R/krsa_histogram_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ krsa_histogram_plot <- function(data,data2,kinases) {
ggplot2::theme_bw() +
ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5))
}

2 changes: 0 additions & 2 deletions R/krsa_show_peptides.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ pluckPeptides <- function(x) {
dplyr::tibble(NumberOfPeptides = length(x)
)
}


2 changes: 0 additions & 2 deletions R/krsa_top_hits.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ krsa_top_hits <- function(zTable,z_thr) {
dplyr::pull(Kinase) %>%
unique()
}


Loading
Loading