Skip to content

Commit e72d852

Browse files
authored
Merge pull request #3 from jasenfinch/devel
v0.2.1
2 parents 0789e93 + 6457f96 commit e72d852

19 files changed

+151
-83
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: riches
22
Title: Strucutral and Functional Enrichment Analyses
3-
Version: 0.2.0
3+
Version: 0.2.1
44
Authors@R:
55
person(given = "Jasen",
66
family = "Finch",

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ importFrom(ggraph,theme_graph)
3535
importFrom(ggthemes,ptol_pal)
3636
importFrom(magrittr,"%>%")
3737
importFrom(magrittr,set_names)
38+
importFrom(metabolyseR,analysisResults)
3839
importFrom(metabolyseR,explanatoryFeatures)
39-
importFrom(metabolyseR,modellingResults)
4040
importFrom(methods,new)
4141
importFrom(mzAnnotation,descriptors)
4242
importFrom(mzAnnotation,filterACCESSIONS)

R/enrichmentParameters.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#' @description Enrichment parameters.
33
#' @param organism KEGG organism ID
44
#' @param model model type to use for extracting explanatory features
5-
#' @param predictor predictor predictor name to use for extracting explanatory features
5+
#' @param response response variable name to use for extracting explanatory features
66
#' @param threshold explanatory feature cutoff
77
#' @importFrom methods new
88
#' @export
99

10-
enrichmentParameters <- function(organism, model = 'randomForest', predictor = 'class', threshold = 0.05){
10+
enrichmentParameters <- function(organism, model = 'randomForest', response = 'class', threshold = 0.05){
1111
new('EnrichmentParameters',
1212
organism = organism,
1313
features = list(
1414
model = model,
15-
predictor = predictor,
15+
response = response,
1616
threshold = threshold
1717
),
1818
structural = list()

R/functionalEnrichment.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' @importFrom MFassign assignments
2121
#' @importFrom dplyr select distinct bind_rows
2222
#' @importFrom purrr map
23-
#' @importFrom metabolyseR modellingResults explanatoryFeatures
23+
#' @importFrom metabolyseR analysisResults explanatoryFeatures
2424
#' @importFrom magrittr set_names
2525
#' @export
2626

@@ -59,9 +59,10 @@ setMethod('functionalEnrichment',signature = signature(analysis = 'Analysis',ass
5959
unique()
6060

6161
explanFeat <- analysis %>%
62-
modellingResults() %>%
63-
{.[[parameters@features$model]][[parameters@features$predictor]]} %>%
64-
explanatoryFeatures(threshold = parameters@features$threshold)
62+
analysisResults('modelling') %>%
63+
.[[parameters@features$model]] %>%
64+
explanatoryFeatures(threshold = parameters@features$threshold) %>%
65+
filter(Response == parameters@features$response)
6566

6667
comparisons <- explanFeat$Comparison %>%
6768
unique()

R/riches.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
globalVariables(c('.','ACCESSION_ID','Name','Adduct','MF','Method','Pvalue','com','FELLA','label','Type'))
2+
globalVariables(c('.','ACCESSION_ID','Name','Adduct','MF','Method','Pvalue','com','FELLA','label','Type','Response'))

data/example_analysis.RData

-897 KB
Binary file not shown.

docs/404.html

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

docs/LICENSE.html

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

docs/authors.html

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

docs/index.html

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

0 commit comments

Comments
 (0)