Skip to content

Commit 2a261db

Browse files
committed
fix broken examples
1 parent 05fd8fe commit 2a261db

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

R/filter_smeta_class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' @param factor_name the sample_meta column name to use
99
#'
1010
#' @examples
11-
#' D = sbcms_data()
11+
#' D = sbcms_dataset()
1212
#' M = filter_smeta(mode='exclude',levels='QC',factor_name='QC')
1313
#' M = method.apply(M,D)
1414
#'

R/fold_change_class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' a log transform and t-test.
55
#'
66
#' @examples
7-
#' D = sbcms_data()
7+
#' D = sbcms_dataset()
88
#' M = fold_change(factor_name='class')
99
#' M = method.apply(M,D)
1010
#'

R/fold_change_int_class.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
#' factors. Note that paired forced to FALSE for all comparisons.
55
#'
66
#' @examples
7-
#' D = sbcms_data()
8-
#' M = fold_change_int(factor_name=c('class','batch'))
7+
#' D = sbcms_dataset()
8+
#' D$data=D$data[,1:10,drop=FALSE]
9+
#' M = filter_smeta(mode='exclude',levels='QC',factor_name='class') +
10+
#' fold_change_int(factor_name=c('class','batch'))
911
#' M = method.apply(M,D)
1012
#'
1113
#' @param alpha confidence level to use for intervals
@@ -20,6 +22,7 @@
2022
fold_change_int<-setClass(
2123
"fold_change_int",
2224
contains=c('method','fold_change'),
25+
prototype = list(predicted='fold_change')
2326
)
2427

2528
#' @export
@@ -30,7 +33,7 @@ setMethod(f="method.apply",
3033

3134
## apply fold change between all pairwise combinations of levels of all factors
3235
# combinations of factors
33-
FF=structToolbox:::full_fact(M$factor_name)
36+
FF=full_fact(M$factor_name)
3437
FF=apply(FF,1,function(x) M$factor_name[x==1])
3538
FF=FF[-1]
3639

R/ttest_class.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ttest<-setClass(
1414
params.mtc='entity.stato',
1515
params.factor_names='entity',
1616
params.paired='entity',
17-
params.paired_factor='character',
17+
params.paired_factor='entity',
1818
# OUTPUTS
1919
outputs.t_statistic='entity.stato',
2020
outputs.p_value='entity',
@@ -52,6 +52,11 @@ ttest<-setClass(
5252
type='logical',
5353
description='TRUE/FALSE to apply paired t-test.'
5454
),
55+
params.paired_factor=entity(name='Paired factor',
56+
value='NA',
57+
type='character',
58+
description='Factor name that encodes the sample id for pairing'
59+
),
5560
outputs.t_statistic=entity.stato(name='t-statistic',
5661
stato.id='STATO:0000176',
5762
type='numeric',

man/filter_smeta-class.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fold_change-class.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fold_change_int-class.Rd

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)