Вопрос

I am currently working on a project where I need to produce a custom graph(here are some examples). These graphs are based on a DNA or protein alignment, where the x-axis is position in DNA or protein sequence, and height of the letters is the frequency of the base or amino acid occurring at that position. I can do all the calculations, but this is my first venture into producing graphics and have no idea of even where to start figuring out how to make this. Any help would be welcome and this project needs to be in python (current hype of the bioinformatics world).

Это было полезно?

Решение

You should check for programs related with (sequence) Motifs searching.
Biopython has a module for this purpose.

Also you can check the source for LaiaMotifs (here the author) which is directed to peptides but can be easily adapted to DNA.

This is a typical figure you can get with LaiaMotifs:

enter image description here

To answer your question about strategies, LaiaMotifs uses an image for each amino acid. Then it calculates frequencies in each position and resize the images taking into account these values. Each position is a column of letters. Finally you join all columns in the figure. For all this image handling you use the PIL library.

Другие советы

Look into matplotlib for python

http://matplotlib.org/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top