nloyfer / wgbs_tools

tools for working with Bisulfite Sequencing data while preserving reads intrinsic dependencies
Other
125 stars 33 forks source link

vis heatmap as a file export (pdf, etc.) #29

Closed avilella closed 1 year ago

avilella commented 1 year ago

Hi,

I've discovered this tool a few days ago and already become a fan of it, as have other scientists in the organization.

Is there a way to produce a file export of the --heatmap form of wgbstools vis?

Thanks

nloyfer commented 1 year ago

Hi Albert. Thank you, that's very nice to hear. What kind of file are you talking about?

text file

You can save the output to a text file in a straightforward way, e.g.

$ wgbstools vis -r chr17:2916694-2916882 Heart*beta --heatmap > output.txt
# Then view it using a text viewer/editor that can interpret ascii colors, e.g.
$ less -SR output.txt

html file

Sometimes I save the outputs as html files, using ansi2html, then view them in a web browser. You could also use elinks, if you don't want to leave the terminal.

$ pip3 install ansi2html
$ wgbstools vis -r chr17:2916694-2916882 Heart*beta --heatmap | ansi2html > output.html

I bet there are other unix tool that convert html to pdf or to an image, but haven't tried them myself.

I hope this answers your question.

avilella commented 1 year ago

Thanks for your reply. Will try it.

On Sun, 29 Jan 2023, 20:29 Netanel Loyfer, @.***> wrote:

Hi Albert. Thank you, that's very nice to hear. What kind of file are you talking about? text file

You can save the output to a text file in a straightforward way, e.g.

$ wgbstools vis -r chr17:2916694-2916882 Heart*beta --heatmap > output.txt# Then view it using a text viewer/editor that can interpret ascii colors, e.g. $ less -SR output.txt

html file

Sometimes I save the outputs as html files, using ansi2html https://pypi.org/project/ansi2html/, then view them in a web browser. You could also use elinks http://elinks.or.cz/, if you don't want to leave the terminal.

$ pip3 install ansi2html $ wgbstools vis -r chr17:2916694-2916882 Heart*beta --heatmap | ansi2html > output.html

I bet there are other unix tool that convert html to pdf or to an image, but haven't tried them myself.

I hope this answers your question.

— Reply to this email directly, view it on GitHub https://github.com/nloyfer/wgbs_tools/issues/29#issuecomment-1407762416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGSN65FNFPNECS2HNMBPDWU3HLLANCNFSM6AAAAAAUHG4DTA . You are receiving this because you authored the thread.Message ID: @.***>

avilella commented 1 year ago

ansi2html worked out really well as a solution. Thanks