Skip to content

Commit

Permalink
New GO category aggregation options (absmean, absmedian)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfulcher committed Aug 14, 2020
1 parent 3cc174a commit bc33737
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions EnsembleEnrichment/ComputeAllCategoryNulls.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions Peripheral/GiveMeDefaultEnrichmentParams.m
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bc33737

Please sign in to comment.