This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Drawing Protein Picture

Dear all I often find protein's image like this alt text

Do you know if exixt a program to draw them (I mean circles with letters)

Thanks

protein sequence visualization

I'm racking my brains for the name of this type of representation, which would allow you to search for software. Similar, but not the same, are the "helical wheel" and "helical net" but as the names suggest, they're used when the protein is helical.

4 answers

UPDATE: I wrote a simple java tool drawing this kind of picture. See my post at: http://plindenbaum.blogspot.com/2011/03/drawing-protein-biostar-6172.html

You can use the following C code drawing a SVG image:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static const float RADIUS=20.0f;

static void svgcolor(char aa)
   {
   switch(toupper(aa))
      {
      case 'V': fputs("red",stdout); break;
      case 'I': fputs("rgb(100,098,187)",stdout); break;
      default: fputs("lightgray",stdout); break;
      }
   }

int main(int argc,char** argv)
   {
   char* seq;
   int len,i;
   if(argc!=2)
      {
      fprintf(stderr,"Usage : %s <peptide>",argv[0]);
      return EXIT_FAILURE;
      }
   seq=argv[1];
   len=strlen(seq);
   printf("\n"
      "<svg\n" "="" xmlns:svg="\"&lt;a" href="http://www.w3.org/2000/svg" rel="nofollow">http://www.w3.org/2000/svg\"\n"
      "   xmlns=\"http://www.w3.org/2000/svg\"\n"
      "   width=\"%f\"\n"
      "   height=\"%f\"\n"
      "   style=\"stroke-width:1px;stroke:black;font-size:%dpx;\"\n"
      "   version=\"1.0\">\n",
      (RADIUS*2),
      (RADIUS*2)*len,
      RADIUS
       );
   printf("%s\n",seq);
   for(i=0;i< len;++i)
      {

      float cy=RADIUS+(RADIUS*2*i);
      printf("",seq[i],i+1,seq[i],(i+1));
      printf("",stdout);
      printf("%c",
         RADIUS,
         cy+RADIUS/4.0,
         RADIUS,
         seq[i]
         );
      printf("");
      }
   printf("\n");
   return 0;
   }

Example:

gcc -o prog prog.c
./prog MKLITILF > pep.svg

It only draws a vertical peptide. But you can then edit this svg file with inkscape www.inkscape.org) to shape the sequence (or you could modify this C code to specify directly the X and Y positions of the amino acids...).

the new HTML editor eats the XML/SVG tags in the printf statements...

Check out the Latex-TEXtopo package. I'm sure it is what you are looking for: example

TeXtopo looks useful but is for transmembrane proteins; the example image in the question does not look like a TM protein.

I spent some time searching Google (first web, then image search) with appropriate keywords, such as "protein sequence circles" or "protein primary structure representation".

Interestingly, your question (and associated image) ranks highly in the image search - image number 12 on the second row, in my search! This rings the alarm bells for me; if such a recent item ranks so highly, it suggests that older items do not have many links to them - if they even exist.

I found several examples of so-called "helical wheel" or "helical net" representations, which are similar to your example but specific to helical (often transmembrane) proteins. One example is figure 6 in this paper. I note that where such figures are presented, there is never any indication that a particular tool was used to create them. In fact, they are frequently made available as a Powerpoint slide.

In my opinion, for the vast majority of cases where you see this type of graphic, no specific software tool was used to make it. I believe that the majority of them are created "by hand", using graphics/presentation software such as Powerpoint. I would suggest that you investigate alternative tools which are less cumbersome and generate more informative visualizations.

One possible solution:

  • Use a font with letters inside circles (I've seen one such freeware, I even had it on my comp some time before. Will update if I find it.)
  • Draw a custom path in InkScape.
  • Use a feature such as "Aligh text to path" to layout the letter-circles on the path.

Log in to answer this question.