Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Krona within another project #170

Open
markschl opened this issue Apr 26, 2022 · 1 comment
Open

Use of Krona within another project #170

markschl opened this issue Apr 26, 2022 · 1 comment

Comments

@markschl
Copy link

I have just created a Github repo containing some useful code for using Krona charts from R and phyloseq (creating, embedding in RStudio and R-Markdown HTML/PDF/...). (https://github.com/markschl/embed_krona).

To allow for custom coloring schemes, I created a script here: krona_import.pl. However, I'm not completely sure if the note on top is enough to comply with the license of Krona. The script is somehow based on the import scripts of Krona and uses the KronaTools perl module, but has its own option parser.

Side note: Of course it would be nice if ktImportText offered importing custom color schemes. This seems to be on the list (#49), but in a more elaborate way than how my script solves it. Another note: I used some ugly Javascript hacks to allow taking snapshots programmatically (e.g. using URL parameters). Maybe I missed some way how this can already be done, but otherwise it would be a very nice feature to allow directly embedding Krona charts in R-Markdown.

@markschl
Copy link
Author

Small update: the R script in embed_krona now directly generates the XML, which is imported with ktImportXML, so the Perl script is not necessary anymore.

The remaining question would be, whether it is ok to modify the Krona JS code on the fly while creating snapshots (also, the code in interactive charts is minified). I would assume so, since I the embed_krona repo doesn't host any copy of the Krona source code, and thus no copyright notice should be needed.

From my side it would be a very nice feature to allow taking snapshots programmatically (e.g. through an URL parameter), making those JS hacks unnecessary that I've used for embedding snapshots into PDFs or other documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant