PhanstielLab / plotgardener

https://phanstiellab.github.io/plotgardener/
Other
299 stars 28 forks source link

add SNP and related text to the figure #100

Closed linpei26 closed 1 year ago

linpei26 commented 1 year ago

Dear plotgardener team!

I wish to know if there is any way to add SNP to the signal tracks? For example, I'd like to add some colored vertical bar under the signal track along with some texts (e.g., rs ID) Maybe, you have some alternative method to do so in a better way.

Thank you!

Pei

nekramer commented 1 year ago

Hi Pei,

To annotate a SNP on a signal track, I would recommend using annoHighlight to add a colored vertical bar to indicate the genomic location of the SNP. Then, the best way to add text below the plot with the rsID of your SNP would be to use plotText. If you want to add text within the plot itself, I would recommend using annoText.

Another option if you want to add vertical bar(s) beneath the signal track would be to use plotRanges with a collapsed view to indicate any SNPs. You can color this in a variety of ways.

I hope this helps! Nicole

linpei26 commented 1 year ago

I'll definitely try this. Thank you Nicole!