From bc33737a915c375a965cdf5fef51c67cfa053cac Mon Sep 17 00:00:00 2001 From: Ben Fulcher Date: Fri, 14 Aug 2020 14:39:33 +1000 Subject: [PATCH] New GO category aggregation options (absmean, absmedian) --- EnsembleEnrichment/ComputeAllCategoryNulls.m | 5 +++++ Peripheral/GiveMeDefaultEnrichmentParams.m | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/EnsembleEnrichment/ComputeAllCategoryNulls.m b/EnsembleEnrichment/ComputeAllCategoryNulls.m index 3299252..5fa21e5 100644 --- a/EnsembleEnrichment/ComputeAllCategoryNulls.m +++ b/EnsembleEnrichment/ComputeAllCategoryNulls.m @@ -114,12 +114,17 @@ end end + %--------------------------------------------------------------------------- % Aggregate gene-wise scores into an overall GO category score switch enrichmentParams.aggregateHow case 'mean' categoryScores{i} = nanmean(scoresHere,1); + case 'absmean' + categoryScores{i} = nanmean(abs(scoresHere),1); case 'median' categoryScores{i} = nanmedian(scoresHere,1); + case 'absmedian' + categoryScores{i} = nanmedian(abs(scoresHere),1); otherwise error('Unknown aggregation option: ''%s''',enrichmentParams.aggregateHow); end diff --git a/Peripheral/GiveMeDefaultEnrichmentParams.m b/Peripheral/GiveMeDefaultEnrichmentParams.m index 2ef1e6d..f362655 100644 --- a/Peripheral/GiveMeDefaultEnrichmentParams.m +++ b/Peripheral/GiveMeDefaultEnrichmentParams.m @@ -28,13 +28,14 @@ % What type of correlation to use enrichmentParams.whatCorr = 'Spearman'; % 'Pearson', 'Spearman' -% How to agglomerate scores within a GO category: -enrichmentParams.aggregateHow = 'mean'; % 'mean', 'median' +% How to aggregate scores within a GO category: +enrichmentParams.aggregateHow = 'mean'; % 'mean', 'absmean', 'median', 'absmedian' % What type of null: enrichmentParams.whatEnsemble = 'randomMap'; % 'randomMap', 'customEnsemble' % Specify a custom data file in the case of running 'customEnsemble' enrichment: +% (file containing the matrix of null phenotypes): enrichmentParams.dataFileSurrogate = []; % Map parameters on to an appropriate file name to save results to: