You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Get differential transcription information to a tibble using glmmSeq
645
+
#'
646
+
#' @keywords internal
647
+
#' @noRd
648
+
#'
649
+
#'
650
+
#'
651
+
#' @import tibble
652
+
#' @importFrom magrittr set_colnames
653
+
#' @importFrom stats model.matrix
654
+
#' @importFrom utils install.packages
655
+
#' @importFrom purrr when
656
+
#' @importFrom rlang inform
657
+
#' @importFrom tidyr spread
658
+
#' @importFrom tidyr pivot_wider
659
+
#' @importFrom dplyr slice
660
+
#'
661
+
#'
662
+
#' @param .data A tibble
663
+
#' @param .formula a formula with no response variable, referring only to numeric variables
664
+
#' @param .sample The name of the sample column
665
+
#' @param .transcript The name of the transcript/gene column
666
+
#' @param .abundance The name of the transcript/gene abundance column
667
+
#' @param .contrasts A character vector. Not used for this method
668
+
#' @param method A string character. Either "edgeR_quasi_likelihood" (i.e., QLF), "edgeR_likelihood_ratio" (i.e., LRT)
669
+
#' @param test_above_log2_fold_change A positive real value. This works for edgeR and limma_voom methods. It uses the `treat` function, which tests that the difference in abundance is bigger than this threshold rather than zero \url{https://pubmed.ncbi.nlm.nih.gov/19176553}.
670
+
#' @param scaling_method A character string. The scaling method passed to the backend function (i.e., edgeR::calcNormFactors; "TMM","TMMwsp","RLE","upperquartile")
671
+
#' @param omit_contrast_in_colnames If just one contrast is specified you can choose to omit the contrast label in the colnames.
# warning("tidybulk says: If you have (i) an intercept-free design (i.e. ~ 0 + factor) or you have a categorical factor of interest with more than 2 values you should use the `contrasts` argument.")
rlang::inform("\ntidybulk says: to access the raw results (fitted GLM) do `attr(..., \"internals\")$glmmSeq`", .frequency_id="Access DE results glmmSeq", .frequency="once")
786
+
787
+
(.)
788
+
} %>%
789
+
790
+
# Attach prefix
791
+
setNames(c(
792
+
colnames(.)[1],
793
+
sprintf("%s%s", prefix, colnames(.)[2:ncol(.)])
794
+
))
795
+
}
646
796
647
797
#' Get differential transcription information to a tibble using voom.
0 commit comments