Can you suggest me on how to label each marker point. I want to check
which point represent which protein. Is it possible to plot the string
label (PDB ID) besides each point?
>>> plt.figure(figsize=(10,8)) # make a large figure so that you can see
labels clearly when you have a large ensemble
>>> labels = ['1XXX', '2YYY', ...] # len of labels must be equal to len of ensemble >>> for i, conf in enumerate(ensemble): >>> showProjection(conf, pca[:2]) >>> xy = calcProjection(conf, pca[:2])[0] >>> plt.text(xy[0], xy[1], labels[i])
This is something I just figure looking examples in http://matplotlib.sourceforge.net/gallery.html and picking the one that looks like what I want to do. It maybe helpful to make other adjustments in your figures.
> Can you suggest me on how to label each marker point. I want to check > which point represent which protein. Is it possible to plot the string > label (PDB ID) besides each point?
The length of the PDB files for the query sequence obtained is 38. However, the length of ensemble obtained is 76 [len (pdbfiles) is not equal to len(ensemble)]. In this case, please suggest me how to label each marker point inorder to check which point represent which protein.
Thanking you in advance.
Regards, -- Shaherin Basith Phd Student Systems Biology lab Ajou University Suwon South Korea e-mail: shaher...@ajou.ac.kr Mobile: 010-6873-1033
On Mon, Oct 10, 2011 at 12:15 PM, Ahmet Bakan <lordn...@gmail.com> wrote: > Hi Shaherin,
> You can do it as follows:
> >>> plt.figure(figsize=(10,8)) # make a large figure so that you can see > labels clearly when you have a large ensemble > >>> labels = ['1XXX', '2YYY', ...] # len of labels must be equal to len of > ensemble > >>> for i, conf in enumerate(ensemble): > >>> showProjection(conf, pca[:2]) > >>> xy = calcProjection(conf, pca[:2])[0] > >>> plt.text(xy[0], xy[1], labels[i])
> This is something I just figure looking examples in > http://matplotlib.sourceforge.net/gallery.html and picking the one > that looks like what I want to do. It maybe helpful to make other > adjustments in your figures.
> Best, > Ahmet
> On Sun, Oct 9, 2011 at 10:22 PM, Shanu <shaher...@gmail.com> wrote:
>> Dear Ahmet,
>> I'm using Prody to create a projection of the ensemble onto PC1 and >> PC2 for my analysis:
>> Can you suggest me on how to label each marker point. I want to check >> which point represent which protein. Is it possible to plot the string >> label (PDB ID) besides each point?
Shaherin, It looks like some of your PDB files contain NMR structures. You should generate a list of labels while building the ensemble, and you should append the label for an NMR structure as many times as the number of models in the structure. Ahmet
On Sun, Oct 16, 2011 at 11:07 AM, shaherin Basith <shaher...@gmail.com>wrote:
> The length of the PDB files for the query sequence obtained is 38. However, > the length of ensemble obtained is 76 [len (pdbfiles) is not equal to > len(ensemble)]. In this case, please suggest me how to label each marker > point inorder to check which point represent which protein.
> Thanking you in advance.
> Regards, > -- > Shaherin Basith > Phd Student > Systems Biology lab > Ajou University > Suwon > South Korea > e-mail: shaher...@ajou.ac.kr > Mobile: 010-6873-1033
> On Mon, Oct 10, 2011 at 12:15 PM, Ahmet Bakan <lordn...@gmail.com> wrote:
>> Hi Shaherin,
>> You can do it as follows:
>> >>> plt.figure(figsize=(10,8)) # make a large figure so that you can see >> labels clearly when you have a large ensemble >> >>> labels = ['1XXX', '2YYY', ...] # len of labels must be equal to len of >> ensemble >> >>> for i, conf in enumerate(ensemble): >> >>> showProjection(conf, pca[:2]) >> >>> xy = calcProjection(conf, pca[:2])[0] >> >>> plt.text(xy[0], xy[1], labels[i])
>> This is something I just figure looking examples in >> http://matplotlib.sourceforge.net/gallery.html and picking the one >> that looks like what I want to do. It maybe helpful to make other >> adjustments in your figures.
>> Best, >> Ahmet
>> On Sun, Oct 9, 2011 at 10:22 PM, Shanu <shaher...@gmail.com> wrote:
>>> Dear Ahmet,
>>> I'm using Prody to create a projection of the ensemble onto PC1 and >>> PC2 for my analysis:
>>> Can you suggest me on how to label each marker point. I want to check >>> which point represent which protein. Is it possible to plot the string >>> label (PDB ID) besides each point?