Skip to content

Commit

Permalink
Rename 'standard' to 'top1000' for clarity and consistency with 'top1…
Browse files Browse the repository at this point in the history
…500'
  • Loading branch information
Nick-Eagles committed Nov 5, 2024
1 parent cd8facb commit 088ce27
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions R/getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#' object containing the transcript data desired to be studied.
#' @param type A `character(1)` specifying the transcripts set type.
#' These were determined by Joshua M. Stolz et al, 2022. Here the names "cell_component", "top1500",
#' and "standard" refer to models that were determined to be effective in removing degradation effects.
#' The "standard" model involves taking the union of the top 1000 transcripts
#' and "top1000" refer to models that were determined to be effective in removing degradation effects.
#' The "top1000" model involves taking the union of the top 1000 transcripts
#' associated with degradation from the interaction model and the main effect model.
#' The "top1500" model is the same as the "standard model except the
#' The "top1500" model is the same as the "top1000 model except the
#' union of the top 1500 genes associated with degradation is selected.
#' The most effective of our models, "cell_component", involved deconvolution of
#' the degradation matrix to determine the proportion of cell types within our studied tissue.
Expand All @@ -32,8 +32,8 @@
#' @import rlang
#'
#' @examples
#' degTx <- getDegTx(rse_tx, "standard")
getDegTx <- function(rse_tx, type = c("cell_component", "standard", "top1500"),
#' degTx <- getDegTx(rse_tx, "top1000")
getDegTx <- function(rse_tx, type = c("cell_component", "top1000", "top1500"),
sig_transcripts = NULL, assayname = "tpm", verbose = TRUE) {
# type = arg_match(type)
if (is.null(sig_transcripts)) {
Expand Down
2 changes: 1 addition & 1 deletion R/qSVA.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' qSVA(rse_tx = rse_tx, type = "cell_component", mod = mod, assayname = "tpm")
#'
qSVA <-
function(rse_tx, type = c("cell_component", "standard", "top1500"),
function(rse_tx, type = c("cell_component", "top1000", "top1500"),
sig_transcripts = NULL, mod, assayname) {
if (is.null(sig_transcripts)) {
type <- arg_match(type) # must be one of those in the list if sig_transcripts is NULL
Expand Down
10 changes: 5 additions & 5 deletions R/select_transcripts.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#'
#' @param type A `character(1)` specifying the transcripts set type.
#' These were determined by Joshua M. Stolz
#' et al, 2022. Here the names "cell_component", "top1500", and "standard" refer
#' et al, 2022. Here the names "cell_component", "top1500", and "top1000" refer
#' to models that were determined to be effective in removing degradation
#' effects. The "standard" model involves taking the union of the top 1000
#' effects. The "top1000" model involves taking the union of the top 1000
#' transcripts associated with degradation from the interaction model and the
#' main effect model. The "top1500" model is the same as the "standard" model
#' main effect model. The "top1500" model is the same as the "top1000" model
#' except the union of the top 1500 genes associated with degradation is
#' selected. The most effective of our models, "cell_component", involved
#' deconvolution of the degradation matrix to determine the proportion of cell
Expand All @@ -28,13 +28,13 @@
#'
#' ## Example where match.arg() auto-completes
#' select_transcripts("top")
select_transcripts <- function(type = c("cell_component", "top1500", "standard")) {
select_transcripts <- function(type = c("cell_component", "top1500", "top1000")) {
type <- match.arg(type)
if (type == "cell_component") {
return(qsvaR::transcripts$cell_component)
} else if (type == "top1500") {
return(qsvaR::transcripts$tx1500)
} else if (type == "standard") {
} else if (type == "top1000") {
return(qsvaR::transcripts$standard)
}
}
6 changes: 3 additions & 3 deletions R/transcripts-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#'
#' An object storing three lists of transcripts each corresponding to a model
#' used in the degradation experiment. These were determined by Joshua M. Stolz
#' et al, 2022. Here the names "cell_component", "top1500", and "standard" refer
#' et al, 2022. Here the names "cell_component", "top1500", and "top1000" refer
#' to models that were determined to be effective in removing degradation
#' effects. The "standard" model involves taking the union of the top 1000
#' effects. The "top1000" model involves taking the union of the top 1000
#' transcripts associated with degradation from the interaction model and the
#' main effect model. The "top1500" model is the same as the "standard" model
#' main effect model. The "top1500" model is the same as the "top1000" model
#' except the union of the top 1500 genes associated with degradation is
#' selected. The most effective of our models, "cell_component", involved
#' deconvolution of the degradation matrix to determine the proportion of cell
Expand Down
10 changes: 5 additions & 5 deletions man/getDegTx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/normalize_tx_names.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/qSVA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/select_transcripts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/transcripts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/which_tx_names.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/Intro_qsvaR.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ rse_tx <- rse_tx[rowMeans(assays(rse_tx)$tpm) > 0.3, ]

## Get Degradation Matrix

In this next step we subset for the transcripts associated with degradation. These were determined by Joshua M. Stolz et al, 2022. We have provided three models to choose from. Here the names `"cell_component"`, `"top1500"`, and `"standard"` refer to models that were determined to be effective in removing degradation effects. The `"standard"` model involves taking the union of the top 1000 transcripts associated with degradation from the interaction model and the main effect model. The `"top1500"` model is the same as the `"standard"` model except the union of the top 1500 genes associated with degradation is selected. The most effective of our models, `"cell_component"`, involved deconvolution of the degradation matrix to determine the proportion of cell types within our studied tissue. These proportions were then added to our `model.matrix()` and the union of the top 1000 transcripts in the interaction model, the main effect model, and the cell proportions model were used to generate this model of quality surrogate variables (qSVs). In this example we will choose `"cell_component"` when using the `getDegTx()` and `select_transcripts()` functions.
In this next step we subset for the transcripts associated with degradation. These were determined by Joshua M. Stolz et al, 2022. We have provided three models to choose from. Here the names `"cell_component"`, `"top1500"`, and `"top1000"` refer to models that were determined to be effective in removing degradation effects. The `"top1000"` model involves taking the union of the top 1000 transcripts associated with degradation from the interaction model and the main effect model. The `"top1500"` model is the same as the `"top1000"` model except the union of the top 1500 genes associated with degradation is selected. The most effective of our models, `"cell_component"`, involved deconvolution of the degradation matrix to determine the proportion of cell types within our studied tissue. These proportions were then added to our `model.matrix()` and the union of the top 1000 transcripts in the interaction model, the main effect model, and the cell proportions model were used to generate this model of quality surrogate variables (qSVs). In this example we will choose `"cell_component"` when using the `getDegTx()` and `select_transcripts()` functions.

```{r VennDiagram,fig.cap="The above venn diagram shows the overlap between transcripts in each of the previously mentioned models.", echo=FALSE}
knitr::include_graphics("../man/figures/transcripts_venn_diagramm.png")
Expand Down

0 comments on commit 088ce27

Please sign in to comment.