emacs org mode html export using jQuery DataTables (WAS: new package for generating interactive HTML reports)
0
0
Entering edit mode
Malcolm Cook ★ 1.6k
@malcolm-cook-6293
Last seen 17 days ago
United States
Michael, I forget to pass along the workaround for the one DataTables bug I've found and not yet kicked upstream ## BUG: the sSwfPath above is ignored!!! - The means for overridding the Default (of ## media/swf/copy_csv_xls.swf seems not to work ## http://datatables.net/release- datatables/extras/TableTools/swf_path.html ## WORKAROUNDS: ## 1) create a symlink in the same dir as the org file named ./media to point to /..../js/DataTables/extras/TableTools/media ## 2) BETTER: change the default sSwfPath in ##/..../js/DataTables/extras/TableTools/media/js/TableTools.min.js ## to point to "/.../js/DataTables/extras/TableTools/media/swf/copy_csv_xls.swf" ~Malcolm .-----Original Message----- .From: bioconductor-bounces at r-project.org [mailto:bioconductor- bounces at r-project.org] On Behalf Of Cook, Malcolm .Sent: Friday, January 11, 2013 3:55 PM .To: 'Michael Lawrence' .Cc: 'bioconductor at r-project.org' .Subject: Re: [BioC] new package for generating interactive HTML reports . .Michael, . .Glad to oblige. . .Assuming you already know org-mode/emacs.... . . .* install DataTables from http://datatables.net/ in /some/useful/place/js/DataTables . .* put this in the 1st line of your .org file: # -*- org- export-babel-evaluate: nil; org-export-allow-BIND: t -*- . .* put another line in your .org file like this: #+SETUPFILE: "/some/useful/place/org/SETUPFILE.org" . .* put the following text in /some/useful/place/org/SETUPFILE.org : . . .#################################################################### ############ .## Making all org exported tables be, by default, .## sortable/filterable/pagable/... .## NOTE: #+BIND requires, to avoid prompting on each export, that .## org-export-allow-BIND be t, as is indicated to emacs with "-*- modeline ; org-export-allow-BIND: t -*-" .## Something to do with security ;) .#################################################################### ############ .#+BIND: org-export-html-table-tag "" .#+STYLE: <script type="text/javascript" charset="utf8" src="/some/useful/place/js/DataTables/media/js/jquery.js"></script> .#+STYLE: <link rel="stylesheet" type="text/css" .href="/some/useful/place/js/DataTables/media/css/jquery.dataTables.c ss"></script> .#+STYLE: <script type="text/javascript" charset="utf8" .src="/some/useful/place/js/DataTables/media/js/jquery.dataTables.min .js"></script> .#+STYLE: <script type="text/javascript" charset="utf8" .src="/some/useful/place/js/DataTables/extras/TableTools/media/js/Tab leTools.min.js"></script> .#+STYLE: <script type="text/javascript">$(document).ready(function() {$('.dataTable').dataTable({"sPaginationType": ."full_numbers","sScrollX": "100%", "bStateSave": true, "bProcessing": true, "bDeferRender": true, "aaSorting": [] , "sDom": .'ClifrtrpT<"afterTable">', "oTableTools": { "sSwfPath": ."/some/useful/place/js/DataTables/extras/TableTools/media/swf/copy_c sv_xls.swf"}}); $("div.afterTable").html('
');});</script> . .Your paths may vary. These worked at the time of deployment a few months ago. . .To have DataTable sort on p-values and other scientific notation, put another line in our SETUPFILE.org: #+STYLE: <script .type="text/javascript" src="/some/useful/place/js/myDatatableUtil.js"></script> . ....and put the following in that file: . .jQuery.fn.dataTableExt.aTypes.unshift( . function ( sData ) . { . if (! isNaN(parseFloat(sData))) { . return 'scientific'; . } . return null; . } .); . .jQuery.extend( jQuery.fn.dataTableExt.oSort, { . "scientific-pre": function ( a ) { . return parseFloat(a); . }, . "scientific-asc": function ( a, b ) { . return ((a < b || isNaN(a)) ? -1 : ((a > b || isNaN(b)) ? 1 : 0)); . }, . "scientific-desc": function ( a, b ) { . return ((a < b || isNaN(a)) ? 1 : ((a > b || isNaN(b)) ? -1 : 0)); . } .} ); . . .~Malcolm . .From: Michael Lawrence [mailto:lawrence.michael at gene.com] .Sent: Friday, January 11, 2013 3:11 PM .To: Cook, Malcolm .Subject: Re: [BioC] new package for generating interactive HTML reports . .Hi Malcolm, . .That sounds really cool. Mind passing me the magic style options? Or a URL? .Thanks, .Michael . .On Fri, Jan 11, 2013 at 12:13 PM, Cook, Malcolm <mec at="" stowers.org<mailto:mec="" at="" stowers.org="">> wrote: .Melanie, . .I too have employed the jsQuery dataTable. . .I use emacs org mode to generate reports with embedded tables, all of which are made indiscriminately made .scrollable/pageable/searchable with the inclusion of a few style directives in the org file. . .With the same upsides&downsides you are discussing here. . .I recommend it for simple standalone html non-interactive reporting. . .In my experience, tens of thousands of rows are easily handled on chrome browser on local area network. . .~Malcolm . . . .-----Original Message----- . .From: bioconductor-bounces at r-project.org<mailto:bioconductor- bounces="" at="" r-project.org=""> [mailto:bioconductor-bounces at r- .project.org<mailto:bioconductor-bounces at="" r-project.org="">] On Behalf Of Melanie Huntley . .Sent: Friday, January 11, 2013 12:37 PM . .To: Sean Davis . .Cc: Josh Kaminker; Michael Lawrence; Melanie Huntley; bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> . .Subject: Re: [BioC] new package for generating interactive HTML reports . . . .Hi Sean, . . . .There certainly seem to be more available options to speed things up if we . .require the hard work to be done server side - we were considering this in . .the initial phases of the package devel. . . . .Our thinking was to keep things as user friendly as possible to start (ie. . .keep things client side) - but the trade-off has been a decrease in . .responsiveness for very large datasets. Perhaps we should revisit the . .server option again for the next release if we don't find a client side . .solution. . . . .Thanks, . .Melanie . . . .On Fri, Jan 11, 2013 at 10:23 AM, Sean Davis <sdavis2 at="" mail.nih.gov<mailto:sdavis2="" at="" mail.nih.gov="">> wrote: . . . .> . .> Hi, Melanie. . .> . .> The "extra" scroller for datatables allows scrolling of VERY large . .> datasets because only a small portion of the entire dataset is sent to . .> the client at one time. The server simply responds to requests for . .> data as the dataset scrolls on the client. The details are here: . .> . .> . .> http://datatables.net/release-datatables/extras/Scroller/server- side_processing.html . .> . .> This would require a server that responds to queries be running while . .> the client is interacting with the data. . .> . .> Sean . .> . .> . .> . .> > On Fri, Jan 11, 2013 at 7:19 AM, Michael Lawrence < . .> lawrence.michael at gene.com<mailto:lawrence.michael at="" gene.com=""> . .> >> wrote: . .> > . .> >> The package is extensible to the point that you could simply create a . .> new . .> >> type of report that is output as some wiki language, so it wouldn't be . .> >> necessary to fork or modify ReportingTools. If there are internal . .> utilities . .> >> for generating data tables that might be usefully shared, they could be . .> >> exposed, or at least factored out for ":::" access. . .> >> . .> >> Michael . .> >> . .> >> . .> >> On Fri, Jan 11, 2013 at 1:02 AM, Xavier de Pedro < . .> xavier.depedro at vhir.org<mailto:xavier.depedro at="" vhir.org=""> . .> >> >wrote: . .> >> . .> >> > Dear Josh & co.: . .> >> > . .> >> > Thanks for producing such a package, it looks promising indeed! . .> >> > . .> >> > I see that it uses jquery data tables, and the live filtering of the . .> data . .> >> > is very fast (nice!). . .> >> > I have a few quick questions, after a quick review of your vignette . .> and . .> >> > examples: . .> >> > . .> >> > Have you experienced any issues when the data set contained in the . .> >> browser . .> >> > is very large (regardless that you set the browser to display just 10 . .> >> > records at a time; I understand that the whole data set is loaded in . .> the . .> >> > browser)? . .> >> > . .> >> > And in my relaxed todo list (without hurries) I had the idea to . .> create a . .> >> > similar package to produce wiki syntax for tables from R data frames, . .> and . .> >> > to display png (or svg) images within pages to be displayed through . .> wiki . .> >> > engines (with it's appropriated syntax for the wiki engine of . .> interest). . .> >> A . .> >> > few years ago I had to do that and I produced some custom function 'ad . .> >> hoc' . .> >> > without releasing it (yet) in any R package. In our example, we run r . .> >> > scripts through Tiki (wiki) pages, through PluginR, but the output is . .> >> > either bare text (so far) or images (png or svg), and any . .> modification is . .> >> > handled by R commands by hand. And a function to produce the "Fancy . .> >> Tables" . .> >> > that Tiki can produce with "JQuery Sortable Tables" is needed ( . .> >> > http://doc.tiki.org/**PluginFancyTable< . .> >> http://doc.tiki.org/PluginFancyTable>). I foresee that maybe the . .> >> datatable jquery plugin could be even better . .> >> > for that, since it contains pagination and live filtering, which can . .> be . .> >> > very very handy!. . .> >> > . .> >> > And maybe you are open to receive improvements/extensions to your . .> package . .> >> > to support other ways to produce the tables required for better . .> >> integration . .> >> > for wiki engines such as Tiki? Or should I fork from your package? . .> >> > . .> >> > Thanks in advanced, and congratulations for the generic package that . .> you . .> >> > created. . .> >> > . .> >> > Xavier . .> >> > . .> >> > . .> >> > On 11/01/13 00:49, Josh Kaminker wrote: . .> >> > . .> >> >> Hi all, . .> >> >> . .> >> >> We present a new R package, . .> >> >> ReportingTools<http: www.**="" .="" .=""> >> bioconductor.org/packages/**devel/bioc/html/*<http: biocondu="" ctor.org="" packages="" **devel="" bioc="" html="" *=""> . .> >> >> *ReportingTools.html< . .> >> . .> http://www.bioconductor.org/packages/devel/bioc/html/ReportingTo ols.html> . .> >> >> >, . .> >> >> for transforming the output of various Bioconductor packages into . .> >> >> interactive web pages. We have found this package very useful in our . .> >> >> collaborations with both bench and other computational scientists. . .> >> >> Examples . .> >> >> and instructions for generating output using this package can be . .> found . .> >> >> here: http://research-pub.gene.com/**ReportingTools/< . .> >> http://research-pub.gene.com/ReportingTools/> . .> >> >> . .> >> >> With just three lines of user code, rich HTML documents can be . .> generated . .> >> >> from the result objects produced by several standard Bioconductor . .> >> packages . .> >> >> including edgeR, limma, GOstats, and GSEAlm. By default, . .> ReportingTools . .> >> >> reports include hyperlinks to relevant external databases and are . .> highly . .> >> >> interactive through the use of filtering and sorting options . .> provided by . .> >> >> open source javascript libraries. Supporting javascript and css . .> >> libraries . .> >> >> are included with all reports, allowing them to be examined on a . .> local . .> >> >> computer without a network connection. Additionally, in- line . .> graphics . .> >> >> have . .> >> >> been developed to accompany statistical results to allow convenient . .> >> visual . .> >> >> inspection of underlying raw data. ReportingTools output is highly . .> >> >> customizable and this package can be used equally well to share . .> results . .> >> >> from automated pipeline processes or individual customized analyses. . .> >> >> . .> >> >> We are very interested in receiving your feedback including feature . .> >> >> requests for this package. . .> >> >> . .> >> >> Best regards, . .> >> >> . .> >> >> Josh Kaminker . .> >> >> Melanie Huntley . .> >> >> Jason Hackney . .> >> >> Jessica Larson . .> >> >> Christina Chaivorapol . .> >> >> . .> >> >> . .> >> >> . .> >> > . .> >> > -- . .> >> > Xavier de Pedro Puente, Ph.D. . .> >> > Statistics and Bioinformatics Unit (UEB) . .> >> > High Technology Unit (UAT) . .> >> > Vall d'Hebron Research Institute (VHIR). Mediterranean Building . .> >> > Passeig de la Vall d'Hebron, 119-129 . .> >> > 08035 Barcelona. Catalonia. Spain . .> >> > Ph. +34 934894007<tel:%2b34%20934894007> / Fax +34 934894015<tel:%2b34%20934894015> . .> >> > xavier.depedro at vhir.org<mailto:xavier.depedro at="" vhir.org=""> . .> >> > http://ueb.vhir.org . .> >> > . .> >> > . .> >> > ______________________________**_________________ . .> >> > Bioconductor mailing list . .> >> > Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> . .> >> > https://stat.ethz.ch/mailman/**listinfo/bioconductor< . .> >> https://stat.ethz.ch/mailman/listinfo/bioconductor> . .> >> > Search the archives: http://news.gmane.org/gmane.** . .> >> > science.biology.informatics.**conductor< . .> >> http://news.gmane.org/gmane.science.biology.informatics.conductor> . .> >> > . .> >> . .> >> [[alternative HTML version deleted]] . .> >> . .> >> _______________________________________________ . .> >> Bioconductor mailing list . .> >> Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> . .> >> https://stat.ethz.ch/mailman/listinfo/bioconductor . .> >> Search the archives: . .> >> http://news.gmane.org/gmane.science.biology.informatics.conductor . .> >> . .> > . .> > . .> > . .> > -- . .> > Melanie Huntley, Ph.D . .> > Bioinformatics and Computational Biology . .> > Genentech, Inc. . .> > huntley.melanie at gene.com<mailto:huntley.melanie at="" gene.com=""> . .> > . .> > [[alternative HTML version deleted]] . .> > . .> > _______________________________________________ . .> > Bioconductor mailing list . .> > Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> . .> > https://stat.ethz.ch/mailman/listinfo/bioconductor . .> > Search the archives: . .> http://news.gmane.org/gmane.science.biology.informatics.conductor . .> . . . . . . . .-- . .Melanie Huntley, Ph.D . .Bioinformatics and Computational Biology . .Genentech, Inc. . .huntley.melanie at gene.com<mailto:huntley.melanie at="" gene.com=""> . . . . [[alternative HTML version deleted]] . . . ._______________________________________________ . .Bioconductor mailing list . .Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> . .https://stat.ethz.ch/mailman/listinfo/bioconductor . .Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor . . . [[alternative HTML version deleted]] . ._______________________________________________ .Bioconductor mailing list .Bioconductor at r-project.org .https://stat.ethz.ch/mailman/listinfo/bioconductor .Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
Network limma GOstats GSEAlm edgeR ReportingTools Network limma GOstats GSEAlm edgeR • 2.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 626 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6