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

Clean up installation #290

Merged
merged 13 commits into from
Aug 29, 2024
58 changes: 58 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
pull_request:

name: check-standard

permissions: read-all

jobs:
check-standard:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
local::.
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
args: 'c("--no-manual","--no-build-vignettes","--no-examples")'
build_args: 'c("--no-manual","--no-build-vignettes", "--no-resave-data")'
error-on: '"error"'
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: nichenetr
Type: Package
Title: NicheNet: Modeling Intercellular Communication by Linking Ligands to Target Genes
Version: 2.1.6
Version: 2.1.7
Authors@R: c(person("Robin", "Browaeys", role = c("aut")),
person("Chananchida", "Sang-aram", role = c("aut", "cre"), email = "[email protected]"))
Description: This package allows you the investigate intercellular communication from a computational perspective. More specifically, it allows to investigate how interacting cells influence each other's gene expression. Functionalities of this package (e.g. including predicting extracellular upstream regulators and their affected target genes) build upon a probabilistic model of ligand-target links that was inferred by data-integration.
Expand All @@ -12,6 +12,7 @@ URL: https://github.com/saeyslab/nichenetr
BugReports: https://github.com/saeyslab/nichenetr/issues
RoxygenNote: 7.3.1
Depends: R (>= 3.0.0)
biocViews:
Imports:
tidyverse,
data.table,
Expand All @@ -27,7 +28,6 @@ Imports:
fdrtool,
ROCR,
caTools,
limma,
Hmisc,
caret,
randomForest,
Expand All @@ -52,6 +52,7 @@ Suggests:
rmarkdown,
testthat,
doMC,
limma,
mco,
parallel,
covr,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ importFrom(igraph,get.data.frame)
importFrom(igraph,graph_from_adjacency_matrix)
importFrom(igraph,page_rank)
importFrom(igraph,sample_degseq)
importFrom(limma,wilcoxGST)
importFrom(magrittr,set_colnames)
importFrom(magrittr,set_rownames)
importFrom(purrr,reduce)
Expand Down
9 changes: 7 additions & 2 deletions R/characterization_data_sources.R
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,15 @@ evaluate_model = function(parameters_setting, lr_network, sig_network, gr_networ
ligand_importances$spearman[is.na(ligand_importances$spearman)] = 0
ligand_importances$pearson_log_pval[is.na(ligand_importances$pearson_log_pval)] = 0
ligand_importances$spearman_log_pval[is.na(ligand_importances$spearman_log_pval)] = 0
ligand_importances$mean_rank_GST_log_pval[is.na(ligand_importances$mean_rank_GST_log_pval)] = 0
ligand_importances$pearson_log_pval[is.infinite(ligand_importances$pearson_log_pval)] = 10000
ligand_importances$spearman_log_pval[is.infinite(ligand_importances$spearman_log_pval)] = 10000
ligand_importances$mean_rank_GST_log_pval[is.infinite(ligand_importances$mean_rank_GST_log_pval)] = 10000

if ("mean_rank_GST_log_pval" %in% colnames(ligand_importances)){
ligand_importances$mean_rank_GST_log_pval[is.na(ligand_importances$mean_rank_GST_log_pval)] = 0
ligand_importances$mean_rank_GST_log_pval[is.infinite(ligand_importances$mean_rank_GST_log_pval)] = 10000
} else{
warning("mean_rank_GST_log_pval not in ligand_importances; do you have limma installed?")
}

all_importances = ligand_importances %>% select_if(.predicate = function(x){sum(is.na(x)) == 0})
# all_importances = full_join(ligand_importances, ligand_importances_glm, by = c("setting","test_ligand","ligand")) %>% full_join(ligand_importances_discrete, by = c("setting","test_ligand", "ligand"))
Expand Down
Loading
Loading