A more general function doing similar fluctuation plot as plot.enma()

Issue #139 resolved
Xinqiu Yao created an issue

Hi,

As is repeatedly required by myself and also members in our lab, a general function for plotting fluctuations (or RMSF) with significance annotation may be necessary. Currently plot.enma() mainly works for eNMA object and is not straightforward for other source of data e.g. from multiple MD simulation trajectories. I am thinking a function with a form like:

plot.fluct(x, col, signif, pcut, qcut, mean=FALSE, ...)

The dots are passed to plot.bio3d(), which can take care of the SSE annotation nicely.

The new argument "mean" should toggle the plot of either all data or mean of each group.

Also, the function should take care of more than two groups (calculate pairwise significance and then annotate if any is <=pcut).

What do you think about this extension?

Comments (8)

  1. Barry Grant

    Sure, this would be useful. We can start with a separate function as you describe but then we may want to merge with plot.bio3d() itself. What form should 'x' take for this function, and how do you identify 'groups' within 'x'?

  2. Xinqiu Yao reporter

    'x' should be either a numeric vector or matrix. 'groups' are defined by col (colors of each line) as we are doing in plot.enma(). We may also think specifying it explicitly with an argument like 'factor'.

  3. Barry Grant

    ok, sounds fine. So are the cols of x the different systems? It might be useful to have plot.bio3d() be able to take this type of input also. Using a 'factor' approach is interesting but requires a little more user effort to actually use productively perhaps.

  4. Xinqiu Yao reporter

    Yes, cols are for different systems. That will be interesting to improve plot.bio3d() for matrix plot, but let's see what it looks like with a separate function. Also, I am thinking an enhancement for current plot.bio3d() to deal with 'x' containing gaps (denoted by NAs). It might be useful since often input are from an alignment. Another interesting extension is an argument for polygon plot, e.g. 'polygon = TRUE'. What do you think?

  5. Lars Skjærven

    good idea. could we make it generic enough so that we can call this from plot.enma() perhaps ?

  6. Xinqiu Yao reporter

    Yes, that is what I am thinking about. It should be capable of dealing with gaps. Will keep you posted.

  7. Log in to comment