Prev: Read from all files in a directory with a MATLAB Script
Next: cannot access mcc daq USB-1298FS with matlab 2010a
From: Will Dampier on 26 Mar 2010 16:06 I'm making a large number of seqlogos programatically. They are hundreds of columns wide and so running a seqlogo normally creates letters that are too thin to see. I've noticed that I only care about a few of these columns (not necessarily consecutive columns) ... most are noise but some are highly conserved. I use something like this snippet: conserve_cell = seqlogo(wide_seqs, 'displaylogo', false); high_bit_cols = any(conserve_cell{2}>1.0,1); [~, handle] = seqlogo(wide_seqs(:,high_bit_cols )); Although when I do this I lose the information about which columns the data came from. Normally I would just change the x-axis of the seqlogo. However, seqlogo's are some sort of crazy java-based object and calls like: set(handle, 'xticklabel', num2str(find(high_bit_cols))) don't work. Any help would be greatly appreciated. Thanks, Will
From: Will Dampier on 26 Mar 2010 17:49 Just adding some initial data to describe the scope of the problem. wide_seqs = cell2mat(arrayfun(@randseq, repmat(200, [500 1]), 'uniformoutput', false)); wide_seqs(:, [17,30, 55,70,130]) = repmat(['ATCGG'], [500 1]) > I use something like this snippet: > conserve_cell = seqlogo(wide_seqs, 'displaylogo', false); > high_bit_cols = any(conserve_cell{2}>1.0,1); > [~, handle] = seqlogo(wide_seqs(:,high_bit_cols ));
From: Lucio Cetto on 30 Mar 2010 11:58 Will: Unfortunatelly there is not an easy workaround to change the xlabels now in seqlogo. Lucio "Will Dampier" <walldo2(a)gmail.com> wrote in message <hoja4g$aob$1(a)fred.mathworks.com>... > Just adding some initial data to describe the scope of the problem. > > wide_seqs = cell2mat(arrayfun(@randseq, repmat(200, [500 1]), 'uniformoutput', false)); > wide_seqs(:, [17,30, 55,70,130]) = repmat(['ATCGG'], [500 1]) > > > I use something like this snippet: > > conserve_cell = seqlogo(wide_seqs, 'displaylogo', false); > > high_bit_cols = any(conserve_cell{2}>1.0,1); > > [~, handle] = seqlogo(wide_seqs(:,high_bit_cols ));
From: Will Dampier on 30 Mar 2010 12:10
"Lucio Cetto" <lcetto(a)nospam.mathworks.com> wrote in message <hot72d$19i$1(a)fred.mathworks.com>... > Will: > Unfortunatelly there is not an easy workaround to change the xlabels now in seqlogo. > Lucio > > "Will Dampier" <walldo2(a)gmail.com> wrote in message <hoja4g$aob$1(a)fred.mathworks.com>... > > Just adding some initial data to describe the scope of the problem. > > > > wide_seqs = cell2mat(arrayfun(@randseq, repmat(200, [500 1]), 'uniformoutput', false)); > > wide_seqs(:, [17,30, 55,70,130]) = repmat(['ATCGG'], [500 1]) > > > > > I use something like this snippet: > > > conserve_cell = seqlogo(wide_seqs, 'displaylogo', false); > > > high_bit_cols = any(conserve_cell{2}>1.0,1); > > > [~, handle] = seqlogo(wide_seqs(:,high_bit_cols )); Thankfully someone on StackOverflow took the time to figure out a work-around. And its a similar one to what I would've done ... just redo the whole seqlogo figure generation and create a more logical figure instead. He uses the image-processing toolbox to create images of the all of the letters and then superimposes them atop the normal figure. The link is here: http://stackoverflow.com/questions/2526714/changing-the-x-axis-of-seqlogo-figures-in-matlab I'm making this into a more general function and I will post it to the FileExchange when I'm done. |