Skip to content

Commit

Permalink
add size factor to glmmseq
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Dec 8, 2023
1 parent 11607be commit 8eb24b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,16 @@ get_differential_transcript_abundance_glmmSeq <- function(.data,
# Make sure the order matches the counts
dispersion = dispersion[rownames(counts)]

# Scaling
sizeFactors <- counts |> edgeR::calcNormFactors(method = scaling_method)


glmmSeq_object =
glmmSeq( .formula,
countdata = counts ,
metadata = metadata,
dispersion = dispersion,
sizeFactors = sizeFactors,
progress = TRUE,
method = method |> str_remove("(?i)^glmmSeq_"),
...
Expand Down
5 changes: 5 additions & 0 deletions R/functions_SE.R
Original file line number Diff line number Diff line change
Expand Up @@ -1154,11 +1154,16 @@ get_differential_transcript_abundance_glmmSeq_SE <- function(.data,
# Make sure the order matches the counts
dispersion = dispersion[rownames(counts)]

# Scaling
sizeFactors <- counts |> edgeR::calcNormFactors(method = scaling_method)


glmmSeq_object =
glmmSeq( .formula,
countdata = counts ,
metadata = metadata |> as.data.frame(),
dispersion = dispersion,
sizeFactors = sizeFactors,
progress = TRUE,
method = method |> str_remove("(?i)^glmmSeq_" ),
...
Expand Down

0 comments on commit 8eb24b5

Please sign in to comment.