Skip to content

Commit

Permalink
Applied negative log10 to gene ontology p-values and created clusterg…
Browse files Browse the repository at this point in the history
…ram again.
  • Loading branch information
MPIBR-unzued committed Feb 1, 2017
1 parent 69d9bb9 commit 89ea1af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions analysis_gene_ontology.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% get go annotation files
annot_files = dir('data/gene_ontology/go_*.txt');

go_matrix = zeros(size(ref_go_terms, 1), size(annot_files, 1));
go_matrix = ones(size(ref_go_terms, 1), size(annot_files, 1));
for i = 1:size(annot_files, 1)
file = annot_files(i);
fRead = fopen(sprintf('data/gene_ontology/%s',file.name),'r');
Expand All @@ -25,7 +25,10 @@
go_matrix(idx_ref, i) = p_values(idx_qry);

end
log_matrix = log10(go_matrix);
log_matrix = abs(log_matrix);

go_table = array2table(go_matrix, 'RowNames', ref_go_terms, 'VariableNames', cellfun(@(s) strtok(s, '.') ,{annot_files.name}, 'UniformOutput', false));

clustergram(go_matrix,'Standardize', 2,'cluster',1, 'ColumnLabels', cellfun(@(s) strtok(s, '.') ,{annot_files.name}, 'UniformOutput', false));
go_table = array2table(log_matrix, 'RowNames', ref_go_terms, 'VariableNames', cellfun(@(s) strtok(s, '.'), {annot_files.name}, 'UniformOutput', false));

clustergram(log_matrix,'Standardize', 2,'cluster',1, 'ColumnLabels', cellfun(@(s) strtok(s, '.'), {annot_files.name}, 'UniformOutput', false));
Binary file modified figures/gene_ontology_clustergram.fig
Binary file not shown.

0 comments on commit 89ea1af

Please sign in to comment.