% Plot gene expression and gene x behavior model heatmaps fdir = uigetdir(pwd,'Select the decathlon_paper_data directory'); D_b = load_decathlon_structs(fdir,'D_als_filled'); D_seq = load_decathlon_structs(fdir,'D_seq'); D_p = pair_rnaseq(D_seq); pairs = unique_idx_pairs(numel(D_p),1); min_reads = 1E5; % --- GENE EXPRESSION HEATMAPS ----- % figure; % get expression data and filter out empty reads d_norm = cell(numel(D_p),1); for i=1:numel(D_p) d = D_p(i).data; filt = nansum(d,2)2),'EdgeColor','none','FaceColor','k'); subplot(2,2,4); barh(sum(p(grp_idx,g_perm)>2,2),'EdgeColor','none','FaceColor','k'); subplot(2,2,3); imagesc(p(grp_idx,g_perm)); colormap(flip(bone,1)); caxis([0 3]); colorbar; title(sprintf('decathlon-%i - mean expression sort',i)); xlabel('genes'); ylabel('behaviors'); set(gca,'TickLength',[0 0]); end