PhanstielLab/plotgardener

plotPairsArches: Line style

Closed this issue · 5 comments

Hi! Many thanks for a nice package!!
I moved from Sushi to plotgardener. Mostly I'm happy to use the plotgardener rather than Sushi. But plotPairsArches doesn't have a line style argument (Line / Ribbon / etc.). Can I draw a line plot using plotPairsArches like plotbedpe on Sushi?

Thank you for checking out plotgardener! Yes, as you mention we do not have those particular line style arguments. However, if you would like a "ribbon" style, you can set the style parameter to "3D". Similarly, if you would like a "2D" representation, you can set the style parameter to "2D". The appearance of these are ultimately dependent on the size of the "anchors" of the pairs.

To achieve the closest appearance to a line style, the "start1" of each pair must be the same as the "end1" and the "start2" of each pair must be the same as the "end2". So for example your data would look like this:

Screen Shot 2022-11-02 at 2 36 20 PM

These are drawn with Bezier curves so the top of the arch will appear slightly thicker, but overall this achieves the effect closest to what you are looking for.

I hope this helps!

Best,
Nicole

Thanks a lot! (Sorry to be late). It was very helpful!

Kim-KL commented

Hi Nicole,

As you previously suggested, the plot is similar with Sushi's line plot (see screenshot). I have one more question. Is it possible to adjust the thickness of the curve? I want to draw thin lines.

Thanks a lot!
KL

image

Hi KL,

If you want to adjust the thickness of the curves, the lwd parameter can help change the thickness of the outer line (defined by linecolor). If this is still not thin enough of a line for you, I would download the latest development version of plotgardener (version 1.7.5) to be able to set fill to NA, set linecolor to the color of your choice, and then really finetune that line with lwd.

Best,
Nicole

Kim-KL commented

Thanks a lot, Nicole!