This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Drawing Pfam Domain Architecture Of Many Uniprot Ids

I have hundreds of Uniprot IDs. I want to plot their domain architectures in a single file. I am wondering how to do that. Here is an example of the domain architecture: http://pfam.sanger.ac.uk/protein/C6DH88#tabview=tab0

uniprot python visualization

Maybe contacting pfam to see if those images are already available might be possible. SMART and myDomains make similar images. MyDomains has a rest interface for example.

1 answer

Pfam domain graphics are generated by JavaScript that is executed by your browser. We have a tool that allows you to generate your own.

To understand how the graphics are generated from a JSON string, see

http://pfam.sanger.ac.uk/help#tabview=tab9

For example, a protein of 300 amino acids would be represented by:

{ 
  "length" : "300"
}

Then to put a domain on this you would add:

{
 "length" : "300"
  "regions" : [ {  
      "type" : "pfama",  
      "text" : "Domain",  
      "colour" : "#9999ff",  
      "display": "true",
      "startStyle" : "curved", 
      "endStyle" : "curved", 
      "start" : "20", 
      "end" : "240", 
      "aliStart" : "20",
      "aliEnd" : "240"
    }
  ]
}

There is far more detail on the help page. Once you have a generated a JSON string like this, you can paste it into the following tool:

http://pfam.sanger.ac.uk/generate_graphic

You can then copy the generated graphic into a document.

If you want a Uniprot accession (and it is found in pfamseq) you can use the following tool to generate the graphic for you by entering the accession: http://pfam.sanger.ac.uk/generate_uniprot_graphic

Hope that helps!

Thank you very much for your explanation. I am mostly familiar with python where I difficulties this json strings a dictionaries. I am wondering how to modify the webpage to accept a list of uniprot ids and generate domain architecture for each of them. Thank you.

@robert.d.finn: Is there a way to add exons overlay to the domains?

Log in to answer this question.