Bioinformatics toolbox - featuresmap question
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to plot the annotations corresponding to a chromosome, and I would like to plot only a small region of the chromosome. I can use something like this:
chrI_gbk = getgenbank('NC_001133');
featuresmap(chrI_gbk, {'CDS'});
but this plots all the genes on a vertical axis. Is it possible to plot only a region, say base pairs 1:5000, and display the genes on a horizontal axis?
Thanks!
Razvan
0 个评论
采纳的回答
Lucio Cetto
2012-3-21
Razvan:
featuresmap cannot do what you need, you'll need to plot the CDS manually, hopefully this gets you started:
figure
hold on
chrI_gbk = getgenbank('NC_001133');
cds = featuresparse(chrI_gbk,'Feature','CDS')
yo = 5;
for i = 1:numel(cds)
starts = cds(i).Indices(1:2:end);
stops = cds(i).Indices(2:2:end);
plot([min(starts),max(stops)],[yo yo]/2,'b')
for j = 1:numel(starts)
px = [starts([j j]) stops([j j])]; % x-coordinates for patch
py = [0 yo yo 0]; % y-coordinates for patch
hq = patch(px,py,'b','FaceColor',[0.8 0.8 1],'EdgeColor','b','Tag','cds');
end
end
fixGenomicPositionLabels
axis([1 50000 -1 30])
HTH Lucio
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bioinformatics Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!