From d9bfdd4d6a18820d91a482bb8001dd607c6ce2ee Mon Sep 17 00:00:00 2001 From: Nick-Eagles Date: Tue, 26 Nov 2024 15:09:01 -0500 Subject: [PATCH] Add myself as an author, update package date, and change tidyverse dependency to dplyr specifically --- DESCRIPTION | 10 ++++++---- NAMESPACE | 2 ++ R/select_transcripts.R | 18 ++++++++++-------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9d4781e..07c29c0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: qsvaR Title: Generate Quality Surrogate Variable Analysis for Degradation Correction Version: 1.9.1 -Date: 2024-09-16 +Date: 2024-11-26 Authors@R: c( person("Joshua", "Stolz", email = "jstolz80@gmail.com", @@ -11,7 +11,9 @@ Authors@R: role = c("ctb", "cre"), comment = c(ORCID = "0000-0002-0380-9740")), person("Leonardo", "Collado-Torres", role = c("ctb"), - email = "lcolladotor@gmail.com", comment = c(ORCID = "0000-0003-2140-308X")) + email = "lcolladotor@gmail.com", comment = c(ORCID = "0000-0003-2140-308X")), + person("Nicholas J.", "Eagles", email = "nickeagles77@gmail.com", + role = c("aut"), comment = c(ORCID = "0000-0002-9808-5254")) ) Description: The qsvaR package contains functions for removing the effect of degration in rna-seq data from postmortem brain tissue. The package is @@ -37,12 +39,12 @@ Suggests: sessioninfo, testthat (>= 3.0.0) Config/testthat/edition: 3 -Imports: +Imports: + dplyr, sva, stats, ggplot2, rlang, - tidyverse, methods Depends: R (>= 4.2), diff --git a/NAMESPACE b/NAMESPACE index efd1f82..7bbf408 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,6 +13,8 @@ import(SummarizedExperiment) import(ggplot2) import(rlang) import(tidyverse) +importFrom(dplyr,pull) +importFrom(dplyr,slice_head) importFrom(methods,is) importFrom(stats,cor) importFrom(stats,prcomp) diff --git a/R/select_transcripts.R b/R/select_transcripts.R index c0e36ed..ae1e6ad 100644 --- a/R/select_transcripts.R +++ b/R/select_transcripts.R @@ -18,6 +18,8 @@ #' #' @return A `character()` with the transcript IDs. #' @export +#' +#' @importFrom dplyr pull slice_head #' #' @examples #' ## Default set of transcripts associated with degradation @@ -34,21 +36,21 @@ select_transcripts <- function(top_n = 1000, cell_component = FALSE) { non_cell_tx = union( qsvaR::transcripts$main_model |> - slice_head(n = top_n) |> - pull(tx), + dplyr::slice_head(n = top_n) |> + dplyr::pull(tx), qsvaR::transcripts$int_model |> - slice_head(n = top_n) |> - pull(tx) + dplyr::slice_head(n = top_n) |> + dplyr::pull(tx) ) if (cell_component) { cell_tx = union( qsvaR::transcripts$cell_main_model |> - slice_head(n = top_n) |> - pull(tx), + dplyr::slice_head(n = top_n) |> + dplyr::pull(tx), qsvaR::transcripts$cell_int_model |> - slice_head(n = top_n) |> - pull(tx) + dplyr::slice_head(n = top_n) |> + dplyr::pull(tx) ) return(union(non_cell_tx, cell_tx)) } else {