バイオメディカル研究におけるJupyterノートブックの再現性評価
この研究は、バイオメディカル研究におけるJupyterノートブックの再現性を評価してるよ。
― 1 分で読む
Jupyterノートブックは、コードやドキュメント、結果を共有するために研究でよく使われるツールだよ。特にバイオメディカル研究では、研究者がインタラクティブに自分の成果を発表できるから便利なんだ。でも、これらのノートブックのコードが再現できるかどうか、つまり他の研究者が同じコードを実行して同じ結果を得られるかが心配されている。
この記事では、バイオメディカル研究分野におけるJupyterノートブックの再現性について探るよ。PubMed Centralを通じて入手できるノートブックに焦点を当てて、どれだけのノートブックが成功裏に実行できて、元の研究で報告された結果と同じ結果を出せるかを見ていくよ。
再現性って何?
研究における再現性は、同じ方法とデータを使って研究を繰り返したときに、同じ結果が得られることを意味するんだ。これは科学的な発見に対する信頼を築くために重要だよ。Jupyterノートブックの文脈では、研究者がノートブックを実行したときに、元の著者と同じ結果が得られるべきってこと。
再現性にはいくつかのレベルがある:
- 方法の再現性:これは研究がどのように行われたかの詳細が、他の人がそれを再現できるように十分に明確であることを意味する。
- 結果の再現性:これは他の人が同じ方法を実行したときに、同じ結果を得られることを意味する。
- 推論の再現性:これは独立した研究者がデータから同じ結論に達することを意味する。
この研究は方法の再現性に焦点を当てていて、ノートブックがエラーなしで実行できるか、同じ出力を出すかを確認するんだ。
研究の概要
Jupyterノートブックの再現性を評価するために、いくつかのステップを踏んだよ:
ノートブックの検索:PubMed Centralの文献を調べて、JupyterノートブックやGitHubリポジトリの言及を探した。GitHubは多くの研究者がコードを共有するプラットフォームなんだ。
ノートブックの実行:ノートブックを特定したら、元の環境にできるだけ近い環境で実行してみた。成功したものと失敗したものを記録したよ。
結果の分析:再現可能だったノートブックのパターンとそうでないものを調べた。これには、ノートブックが正しく実行されるために必要な他のソフトウェアやライブラリに関連する問題を確認することが含まれた。
時間をかけた比較:再現性の向上があったかどうかをチェックするために、異なる時間帯で上記のステップを繰り返した。
Jupyterノートブックの検索
関連するノートブックを見つけるために、PubMed Centralを使ってJupyterとGitHubに言及している記事を検索した。この検索で数千のJupyterノートブックに関連する記事が見つかった。特定の数の出版物に焦点を当てて、対応するGitHubリポジトリがあるものをメモしたよ。
リポジトリアナリシス
レビューした結果、これらの記事にリンクされた多くのGitHubリポジトリが見つかった。リポジトリをクローンして、Jupyterノートブックが含まれているかを確認した。多くのリポジトリにはPythonベースのノートブックがあって、これはこの研究で使われている主要なプログラミング言語だよ。
ノートブックの実行
ノートブックを特定したら、それを実行してみた。必要な依存関係を自動的にインストールするようにJupyter環境を設定したんだけど、多くのエラーに遭遇した。欠損や不正確な依存性の宣言のために、実行できなかったノートブックがいくつかあったよ。
分析中に、エラーなしで実行できたノートブックもかなりあったけど、他の多くは実行中に発生するエラーを引き起こした。
よくある問題
分析を通じて、ノートブックの再現性に影響を与えるいくつかの共通の問題を指摘したよ:
依存関係の欠如:多くのノートブックは、コードを実行するために必要なライブラリに関する明確な指示がなかった。これが元の著者が設定した環境を再現するのを難しくしたんだ。
未定義の変数:コードセル内に定義されていない変数が原因でエラーが出るノートブックもあった。これが結果を再現しようとする人を混乱させることがよくあるんだ。
ファイルが見つからないエラー:しばしば、ノートブックがGitHubリポジトリに含まれていないデータファイルにアクセスしようとする。これがコードをスムーズに実行するのを不可能にした。
バージョンの互換性:Pythonやライブラリの異なるバージョンがノートブックを壊すことがある。この問題は、元のコードがもはやサポートされていない古いバージョンで書かれたときによく起こる。
調査結果の例
数千のノートブックを実行した後、結果をまとめたよ。成功裏に実行され、元の論文で報告されたのと同じ結果を出したノートブックはごく一部だった。多くのノートブックは実行に失敗するか、期待された結果とは異なる結果を生成した。
最近のノートブックの方が古いものよりも再現性が高い傾向があることも観察した。これは、研究者の間で再現性に対する意識が高まり、改善された実践があることを示しているかもしれない。
再現性向上のための提案
バイオメディカル研究におけるJupyterノートブックの再現性を改善するために、いくつかの提案をするよ:
依存関係の明確なドキュメント:研究者はすべての必要なライブラリとその特定のバージョンを明確にリストアップして、他の人が同じ環境を簡単に設定できるようにすべきだ。
データファイルの含有:ノートブックがデータファイルに依存する場合、それらをGitHubリポジトリに含めるか、適切なアクセス手順を提供すべきだ。
定期的な更新とメンテナンス:作者は時間が経つにつれてソフトウェアの依存関係が変化するから、定期的に自分のノートブックが正しく動作するか確認すべきだ。
トレーニングと意識向上:研究者はコードや結果を共有するためのベストプラクティスについて教育を受けるべきだ。トレーニングセッションが再現性の重要性に対する意識を高める手助けになるかもしれない。
自動チェックの実装:記事が出版のために提出される前に、一般的な再現性問題をチェックする自動ツールを実装することで、共有ノートブックの品質が大幅に向上する可能性があるよ。
結論
この研究は、Jupyterノートブックがバイオメディカル研究で人気を集めている一方で、その再現性に関しては重大な課題があることを明らかにした。多くの問題は、依存関係の欠如や不十分なドキュメントから生じている。でも、特に新しいノートブックが古い例よりも信頼性が高いことから、改善の可能性はある。
今後は、研究者が自分の成果を文書化するベストプラクティスを採用して、他の人がその結果を再現できるようにする必要がある。これにより、結果の信頼性が向上するだけでなく、科学全体の進歩にも貢献できるんだ。再現性に焦点を当てることで、科学コミュニティは未来の研究のためにより強固な基盤を築けるんだよ。
タイトル: Computational reproducibility of Jupyter notebooks from biomedical publications
概要: Jupyter notebooks facilitate the bundling of executable code with its documentation and output in one interactive environment, and they represent a popular mechanism to document and share computational workflows. The reproducibility of computational aspects of research is a key component of scientific reproducibility but has not yet been assessed at scale for Jupyter notebooks associated with biomedical publications. We address computational reproducibility at two levels: First, using fully automated workflows, we analyzed the computational reproducibility of Jupyter notebooks related to publications indexed in PubMed Central. We identified such notebooks by mining the articles full text, locating them on GitHub and re-running them in an environment as close to the original as possible. We documented reproduction success and exceptions and explored relationships between notebook reproducibility and variables related to the notebooks or publications. Second, this study represents a reproducibility attempt in and of itself, using essentially the same methodology twice on PubMed Central over two years. Out of 27271 notebooks from 2660 GitHub repositories associated with 3467 articles, 22578 notebooks were written in Python, including 15817 that had their dependencies declared in standard requirement files and that we attempted to re-run automatically. For 10388 of these, all declared dependencies could be installed successfully, and we re-ran them to assess reproducibility. Of these, 1203 notebooks ran through without any errors, including 879 that produced results identical to those reported in the original notebook and 324 for which our results differed from the originally reported ones. Running the other notebooks resulted in exceptions. We zoom in on common problems, highlight trends and discuss potential improvements to Jupyter-related workflows associated with biomedical publications.
著者: Sheeba Samuel, Daniel Mietchen
最終更新: 2023-08-10 00:00:00
言語: English
ソースURL: https://arxiv.org/abs/2308.07333
ソースPDF: https://arxiv.org/pdf/2308.07333
ライセンス: https://creativecommons.org/licenses/by/4.0/
変更点: この要約はAIの助けを借りて作成されており、不正確な場合があります。正確な情報については、ここにリンクされている元のソース文書を参照してください。
オープンアクセスの相互運用性を利用させていただいた arxiv に感謝します。
参照リンク
- https://www.overleaf.com/latex/examples/simple-stylish-box-design/stzmmcshxdng
- https://doi.org/10.1109/MCSE.2023.3241105
- https://scholia.toolforge.org/Q120999953
- https://numpy.org/case-studies/blackhole-image/
- https://ieeexplore.ieee.org/iel7/5992/10124086/10040660.pdf
- https://www.ncbi.nlm.nih.gov/pmc/
- https://github.com/
- https://jupyter.org/
- https://posit.co/products/open-source/rstudio/
- https://plutojl.org/
- https://www.sqlite.org
- https://www.issn.org/
- https://www.iso.org
- https://www.ncbi.nlm.nih.gov/mesh
- https://id.nlm.nih.gov/mesh/sparql
- https://nbviewer.org/
- https://docs.github.com/en/rest/guides/getting-started-with-the-rest-api
- https://docs.python.org/3/library/ast.html
- https://github.com/s-weigand/flake8-nb
- https://www.python.org/dev/peps/pep-0008/
- https://pycodestyle.pycqa.org/en/latest/intro.html
- https://docs.conda.io/en/latest/
- https://docs.anaconda.com/anaconda/packages/pkg-docs/
- https://www.prisma-statement.org/
- https://texfaq.org/FAQ-ftncapt
- https://github.com/jupyter/nbdime
- https://numpy.org/
- https://pandas.pydata.org/
- https://plotly.com/python/
- https://matplotlib.org/stable/tutorials/introductory/pyplot.html
- https://wiki.uni-jena.de/pages/viewpage.action?pageId=22453005
- https://github.com/fusion-jena/computational-reproducibility-pmc/commits/main
- https://wiki.uni-jena.de/display/WIL/2023/04
- https://wiki.uni-jena.de/pages/viewpage.action?pageId=84544195
- https://wiki.uni-jena.de/pages/viewpage.action?pageId=68787746
- https://green-algorithms.org
- https://github.com/lhqing/mouse
- https://github.com/SIMEXP/cdip_human_phantom/blob/master/notebooks/stats_repro.ipynb
- https://docs.google.com/document/d/1aTniJN6PImtLz9mzryQAWt9WSATGzAXS3kS9XZD1u6E/edit
- https://tex.stackexchange.com/questions/306568/how-to-create-a-box-with-caption-and-label-like-a-float
- https://w.wiki/7D9d
- https://www.wikidata.org/wiki/Q70357595
- https://scholia.toolforge.org/topic/Q70357595
- https://scholia.toolforge.org/
- https://scholia.toolforge.org/software/Q70357595
- https://scholia.toolforge.org/software/Q99439688
- https://w.wiki/7CMw
- https://scholia.toolforge.org/use/Q70357595
- https://scholia.toolforge.org/uses/Q70357595,Q197520
- https://scholia.toolforge.org/organization/Q1341845
- https://scholia.toolforge.org/organization/Q1341845/use/Q70357595
- https://scholia.toolforge.org/topic/Q1425625
- https://scholia.toolforge.org/use/Q70357595/curation
- https://docs.google.com/presentation/d/1k9i032ujwHSvH2kqDKia7xWB0lEO2sxk-YUMlTDms_Q/edit
- https://scholia.toolforge.org/use/Q70357595#topics-of-works-using-the-resource
- https://pypi.org/project/pipdeptree/
- https://dephell.readthedocs.io/use-tree-git.html
- https://orcid.org/
- https://gitlab.com/mwoodbri/jupyter-ci
- https://docs.google.com/spreadsheets/d/11V2b2n7f8eCZazOY_5x4vMHpWWNoNMNMPQoiwKwud1g/edit
- https://elifesciences.org/collections/d72819a9/executable-research-articles
- https://elifesciences.org/labs/ad58f08d/introducing-elife-s-first-computationally-reproducible-article
- https://elifesciences.org/for-the-press/eb096af1/elife-launches-executable-research-articles-for-publishing-computationally-reproducible-results
- https://python-poetry.org/
- https://numpy.org/neps/nep-0029-deprecation_policy.html
- https://numpy.org/neps/nep-0029-deprecation
- https://endoflife.date/python
- https://rescience.github.io/
- https://doi.org/10.5281/zenodo.6802158
- https://doi.org/10.5281/zenodo.8226725
- https://github.com/fusion-jena/computational-reproducibility-pmc
- https://www.crossref.org/fundingdata/
- https://academic.oup.com/gigascience/pages/editorial_policies_and_reporting_standards
- https://docs.casrai.org/CRediT