簡體   English   中英

在帶有R的jupyter中顯示html報告

[英]Display html report in jupyter with R

ShortRead生物導體庫的qa()函數從fastq文件生成質量統計信息。 然后,report()函數以html格式准備各種度量的報告。 該站點上的其他一些問題建議使用IRdisplay的display_html()函數在使用R(irkernel)的jupyter筆記本中顯示html。 但是,它只在嘗試顯示由ShortRead的report()函數生成的html報告時才對我拋出錯誤。

library("ShortRead")
sample_dir <- system.file(package="ShortRead", "extdata", "E-MTAB-1147") # A sample fastq file
qa_object <- qa(sample_dir, "*fastq.gz$")
qa_report <- report(qa_object, dest="test") # Makes a "test" directory containing 'image/', 'index.html' and 'QA.css'
library("IRdisplay")
display_html(file = "test/index.html")

給我:

Error in read(file, size): unused argument (size)
Traceback:

1. display_html(file = "test/index.html")
2. display_raw("text/html", FALSE, data, file, isolate_full_html(list(`text/html` = data)))
3. prepare_content(isbinary, data, file)
4. read_all(file, isbinary)

是否有另一種方法可以在R的jupyter中顯示此報告?

看起來代碼中有錯誤。 快速解決方案是克隆github存儲庫,並對./IRdisplay/R/utils.r進行以下編輯,然后在第38行將行從以下位置更改:

read(file,size)

read(size)

保存文件,切換到父目錄,然后創建一個新的tarbal,例如

tar -zcf IRdisplay.tgz IRdisplay/

然后重新安裝新版本,例如,重新啟動R后,鍵入:

install.packages( "IRdisplay.tgz", repo=NULL )

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM