Skip to content

Commit 5e4331c

Browse files
authored
Merge pull request #318 from stemangiola/update_confounders_and_filtering
Update confounders and filtering
2 parents f58b1e3 + b04680a commit 5e4331c

5 files changed

+36
-14
lines changed

R/methods.R

+6
Original file line numberDiff line numberDiff line change
@@ -3132,6 +3132,7 @@ setGeneric("identify_abundant", function(.data,
31323132
.transcript = NULL,
31333133
.abundance = NULL,
31343134
factor_of_interest = NULL,
3135+
design = NULL,
31353136
minimum_counts = 10,
31363137
minimum_proportion = 0.7)
31373138
standardGeneric("identify_abundant"))
@@ -3142,6 +3143,7 @@ setGeneric("identify_abundant", function(.data,
31423143
.transcript = NULL,
31433144
.abundance = NULL,
31443145
factor_of_interest = NULL,
3146+
design = NULL,
31453147
minimum_counts = 10,
31463148
minimum_proportion = 0.7)
31473149
{
@@ -3250,6 +3252,7 @@ setGeneric("identify_abundant", function(.data,
32503252
edgeR::filterByExpr(
32513253
min.count = minimum_counts,
32523254
group = string_factor_of_interest,
3255+
design = design,
32533256
min.prop = minimum_proportion
32543257
) %>%
32553258
not() |>
@@ -3345,6 +3348,7 @@ setGeneric("keep_abundant", function(.data,
33453348
.transcript = NULL,
33463349
.abundance = NULL,
33473350
factor_of_interest = NULL,
3351+
design = NULL,
33483352
minimum_counts = 10,
33493353
minimum_proportion = 0.7)
33503354
standardGeneric("keep_abundant"))
@@ -3355,6 +3359,7 @@ setGeneric("keep_abundant", function(.data,
33553359
.transcript = NULL,
33563360
.abundance = NULL,
33573361
factor_of_interest = NULL,
3362+
design = NULL,
33583363
minimum_counts = 10,
33593364
minimum_proportion = 0.7)
33603365
{
@@ -3387,6 +3392,7 @@ setGeneric("keep_abundant", function(.data,
33873392
.transcript = !!.transcript,
33883393
.abundance = !!.abundance,
33893394
factor_of_interest = !!factor_of_interest,
3395+
design = design,
33903396
minimum_counts = minimum_counts,
33913397
minimum_proportion = minimum_proportion
33923398
) |>

R/methods_SE.R

+11-7
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,7 @@ setMethod("keep_variable",
15721572
.transcript = NULL,
15731573
.abundance = NULL,
15741574
factor_of_interest = NULL,
1575+
design = NULL,
15751576
minimum_counts = 10,
15761577
minimum_proportion = 0.7)
15771578
{
@@ -1679,6 +1680,7 @@ setMethod("keep_variable",
16791680
edgeR::filterByExpr(
16801681
min.count = minimum_counts,
16811682
group = string_factor_of_interest,
1683+
design = design,
16821684
min.prop = minimum_proportion,
16831685
lib.size = Matrix::colSums(., na.rm=TRUE)
16841686
) %>%
@@ -1726,6 +1728,7 @@ setMethod("identify_abundant",
17261728
.transcript = NULL,
17271729
.abundance = NULL,
17281730
factor_of_interest = NULL,
1731+
design = NULL,
17291732
minimum_counts = 10,
17301733
minimum_proportion = 0.7)
17311734
{
@@ -1745,7 +1748,8 @@ setMethod("identify_abundant",
17451748
factor_of_interest = !!factor_of_interest,
17461749
minimum_counts = minimum_counts,
17471750
minimum_proportion = minimum_proportion,
1748-
.abundance = !!.abundance
1751+
.abundance = !!.abundance,
1752+
design = design
17491753
)
17501754

17511755
.data[rowData(.data)$.abundant,]
@@ -2818,14 +2822,14 @@ setMethod("describe_transcript", "RangedSummarizedExperiment", .describe_transcr
28182822
#' @importFrom SummarizedExperiment as.data.frame
28192823
.resolve_complete_confounders_of_non_interest <- function(se, ...){
28202824

2821-
colData(se) =
2822-
colData(se) |>
2823-
as.data.frame() |>
2824-
.resolve_complete_confounders_of_non_interest_df(...) |>
2825+
colData(se) =
2826+
colData(se) |>
2827+
as.data.frame() |>
2828+
.resolve_complete_confounders_of_non_interest_df(...) |>
28252829
DataFrame()
2826-
2830+
28272831
se
2828-
2832+
28292833
}
28302834

28312835
#' resolve_complete_confounders_of_non_interest

man/identify_abundant-methods.Rd

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/keep_abundant-methods.Rd

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/resolve_complete_confounders_of_non_interest.Rd

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)