CINXE.COM
Bioconductor - Package Vignettes
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" prefix="og: http://ogp.me/ns#"> <!-- htmllint preset="none" --> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="robots" content="all" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="The Bioconductor project aims to develop and share open source software for precise and repeatable analysis of biological data. We foster an inclusive and collaborative community of developers and data scientists." /> <title>Bioconductor - Package Vignettes</title> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> <link rel="stylesheet" href="/style/existing.css" /> <!-- General styling --> <link rel="stylesheet" type="text/css" href="/style/base/fonts.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/colors.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/typography.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/layout.css" media="screen" /> <!-- Component styling --> <link rel="stylesheet" type="text/css" href="/style/components/code.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/gallery.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/blockquote.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/lists.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/breadcrumbs.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/buttons.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/tables.css" media="screen" /> <!-- Block styling --> <link rel="stylesheet" type="text/css" href="/style/sections/announcement.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/hero.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/header.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/sidebar.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/footer.css" media="screen"/> <!-- Page styling --> <link rel="stylesheet" type="text/css" href="/style/pages/home.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/get-started.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/learn-and-dev.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/about.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/packages.css" media="screen"/> <link rel="SHORTCUT ICON" type="image/x-icon" href="/favicon.ico" /> <link rel="ICON" type="image/x-icon" href="/favicon.ico" /> </head> <body> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-WJMEEH1J58"></script> <script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag("js", new Date()); gtag("config", "G-WJMEEH1J58"); </script> <script type="text/javascript" src="/js/jquery.js"></script> <script src="/js/jquery.tools.min.js"></script> <script type="text/javascript" src="/js/bioconductor.js"></script> <script type="text/javascript" src="/js/jquery.corner.js"></script> <script type="text/javascript" src="/js/jquery.timeago.js"></script> <script type="text/javascript" src="/js/bioc-style.js"></script> <script type="text/javascript" src="/js/versions.js"></script> <script type="text/javascript" src="/js/code_blocks.js"></script> <script type="text/javascript" src="/js/sidebar.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <header id="site-masthead" class="site-masthead"> <div class="announcement announcement-brand"> <svg xmlns="http://www.w3.org/2000/svg" width="19" height="18" viewBox="0 0 19 18" fill="none"> <path d="M9.50003 6.75V8.25M9.50003 11.25H9.50753M4.30387 14.25H14.6962C15.8509 14.25 16.5726 13 15.9952 12L10.7991 3C10.2217 2 8.77834 2 8.20099 3L3.00484 12C2.42749 13 3.14917 14.25 4.30387 14.25Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> </svg> <p style="font-size:125%"> Registration and Abstract Submission Open for <br> <a href="https://gbcc2025.bioconductor.org/">GBCC2025</a>: Joint Galaxy/Bioconductor Conference <br> Early registration discount pricing ends March 31! </p> </div> <!-- If there are no announcements, comment out the element --> <div class="header-size"> <div class="header-logo"> <a href="/"> <img src="/images/logo/svg/Logo.svg" class="masthead-logo" alt="Bioconductor home" /> </a> </div> <nav class="header-nav"> <div class="nav-links"> <a class="format-bold mobile-link" href="/about/">About</a> <a class="format-bold mobile-link" href="/help/">Learn</a> <a class="format-bold mobile-link" href="/packages/release/BiocViews.html#___Software">Packages</a> <a class="format-bold mobile-link" href="/developers/">Developers</a> </div> <div class="search-container"> <form class="site-search" id="search-form" method="GET" action="/help/search/index.html" > <label for="search-bar" class="sr-only">Search</label> <img src="/images/icons/search-icon.svg" class="search-icon" alt="Search icon" aria-hidden="true" /> <input class="search-bar" name="search-bar" placeholder="Search" id="search-bar" /> </form> </div> <a class="header-button format-bold mobile-link" href="/install/"> <span class="get-started format-bold"> Get Started <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none" > <path d="M5.25 3.66665L9.33333 7.74998L5.25 11.8333" stroke="#3792AD" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </span> </a> </nav> <div class="nav-mobile"> <h6>Menu</h6> <div class="hamburger"> <span class="bar"></span> <span class="bar"></span> <span class="bar"></span> </div> </div> </div> </header> <main> <div class="container main-subnav"> <section class="left-col"> <div class="left-col-inner"> <div class="sidebar-box"> <div class="sidebar-box-header"> <p class="format-bold">Release Packages: </p> <p>Bioconductor's stable, semi-annual release:</p> </div> <nav> <div><a class="symlink" href="/packages/release/BiocViews.html#___Software"> Analysis software packages </a></div> <div><a class="symlink" href="/packages/release/BiocViews.html#___AnnotationData"> Annotation packages</a></div> <div><a class="symlink" href="/packages/release/BiocViews.html#___ExperimentData"> Illustrative experiment data packages</a></div> <div><a class="symlink" href="/packages/release/BiocViews.html#___Workflow">Workflow packages</a> </div> <div><a class="symlink" href="/help/bioconductor-books/">Online books</a></div> </nav> </div> <div class="sidebar-box"> <div class="sidebar-box-header"> <p class="format-bold">Development Version</p> <p>Bioconductor packages under development:</p> </div> <nav> <div> <a class="symlink" href="/packages/devel/BiocViews.html#___Software"> Analysis software packages. </a> </div> <div> <a class="symlink" href="/packages/devel/BiocViews.html#___AnnotationData" >Annotation packages </a> </div> <div> <a class="symlink" href="/packages/devel/BiocViews.html#___ExperimentData"> Illustrative experiment data packages </a> </div> <div> <a class="symlink" href="/packages/devel/BiocViews.html#___Workflow"> Workflow packages </a> </div> <div><a class="symlink" href="/help/bioconductor-books/">Online books</a></div> </nav> </div> </div> </section> <section class="content"> <ul class="breadcrumbs"> <li><a href="/">Home</a></li> <li><a href="/help/">Help</a></li> <li>Package Vignettes</li> </ul> <h1 id="package-vignettes">Package Vignettes</h1> <p>Each Bioconductor package contains at least one vignette, a document that provides a task-oriented description of package functionality. Vignettes contain executable examples and are intended to be used interactively.</p> <p>You can access the compiled version of a vignette for any installed package from inside R using the <code>browseVignettes</code> function. For example, to view the vignettes in the Biostrings package enter the following at an R prompt:</p> <pre><code class="language-r">browseVignettes(package = "Biostrings") </code></pre> <p>This will open a web browser with links to the compiled vignette, as well as a plain-text R file containing the code used in the vignette.</p> <p>The vignette files, both the compiled and the sources documents, are located in the <code>doc</code> directory of an installed package (inst/doc for an uninstalled package tarball). You can discover the location of an installed package as follows:</p> <pre><code class="language-r">system.file(package = "Biostrings") </code></pre> <p>Older vignettes are mostly written in Sweave format with extension Rnw while newer vignttes mostly take advantage of Rmarkdown with extension Rmd. You can extract all of the R code from a vignette source file from a package. The result will be a <code>.R</code> file for each vignette source file written to your current working directory. You can use these R files to cut and paste into an R session so that you can work the examples in the vignette yourself.</p> <p>The steps to extract R code depend if the source code is a Rnw Sweave format or Rmd Rmarkdown format. These commands would be run at an R prompt.</p> <p>For Sweave we use <code>tools::Stangle</code>:</p> <pre><code class="language-r">library("tools") vigSrc = list.files(pattern = "Rnw$", system.file("doc", package = "Biostrings"), full.names = TRUE) vigSrc for (v in vigSrc) Stangle(v) </code></pre> <p>For Rmarkdown we use <code>knitr::purl</code>:</p> <pre><code class="language-r">library("knitr") vigSrc = list.files(pattern = "Rmd$", system.file("doc", package = "BiocFileCache"), full.names = TRUE) vigSrc for (v in vigSrc) purl(v) </code></pre> <p>You can also view or download the vignette for a package that isn鈥檛 installed on your system by visiting the package鈥檚 description page linked from the <a href="/packages/release/bioc/">list of Bioconductor packages</a></p> <p><em>Term of use for the vignettes</em>: You are welcome to use these materials for instructional purposes. However, you may not include these in separately published works (articles, books, websites). When using all or parts of the Bioconductor course materials (slides, vignettes, scripts), we would appreciate it if you would cite the authors and refer your audience to the Bioconductor website.</p> <p>Please also remember to check package documention help files. You can access help files for a package within R with <code>?</code>.</p> <pre><code class="language-r">library("Biostrings") ?DNAString ?reverseComplement </code></pre> </section> </main> <footer> <div class="footer-container"> <div class="link-container"> <div class="link-container-inner"> <nav> <a href="/about/index.html"><h3>About</h3></a> <a href="/about/annual-reports/">Annual Reports</a> <a href="/about/collaborations/">Collaborations</a> <a href="/about/core-team/">Core Team</a> <a href="/about/mirrors/">Mirrors</a> <a href="/dashboard/">Dashboard</a> <a href="/about/">Project Details</a> <a href="/about/code-of-conduct/">Code of Conduct</a> </nav> <nav> <a href="/developers/index.html"><h3>Developers</h3></a> <a href="https://contributions.bioconductor.org/develop-overview.html">Package Guidelines</a> <a href="https://contributions.bioconductor.org/submission-overview.html">Package Submission</a> <a href="/developers/release-schedule/">Release Schedule</a> <a href="/about/release-announcements/">Release Announcements</a> <a href="https://contributions.bioconductor.org/git-version-control.html">Source Control</a> <a href="https://code.bioconductor.org/">Browsable Code Base</a> <a href="/checkResults/">Build Reports</a> </nav> </div> <div class="link-container-inner"> <nav> <a href="/help/index.html"><h3>Learn</h3></a> <a href="https://training.bioconductor.org/">Education and Training</a> <a href="/help/bioconductor-books/">Bioconductor Books</a> <a href="/help/package-vignettes/">Package Vignettes</a> <a href="/packages/release/workflows/">Workflows</a> <a href="/help/publications/">Publications</a> <a href="/help/community/">Community Resources</a> <a href="/help/support/">Get Help</a> </nav> <nav> <a href="/install/index.html"><h3>Get started</h3></a> <a href="/install/index.html#install-R">Install R</a> <a href="/install/index.html#find-bioconductor-packages">Find Bioconductor Packages</a> <a href="/install/index.html#install-bioconductor-packages">Install Bioconductor Packages</a> <a href="/install/index.html#update-bioconductor-packages">Update Bioconductor Packages</a> <a href="/help/docker/">Docker Images</a> <a href="https://anvil.bioconductor.org/">Bioconductor in AnVIL</a> <a href="/packages/release/BiocViews.html#___Software">Bioconductor Packages</a> </nav> </div> </div> <div class="logo-contact-container"> <div class="copyright"> <p> Contact us: <a class="text-underline" href="https://support.bioconductor.org/">support.bioconductor.org</a><br/> Copyright © 2003 - 2025 Bioconductor </p> </div> <div class="socials-logo-container"> <div class="socials"> <a href="https://slack.bioconductor.org/" target="_blank"><img alt="Slack Logo" src="/images/icons/slack.png" /></a> <a href="https://www.youtube.com/user/bioconductor" target="_blank"><img alt="YouTube Logo" src="/images/icons/svgs/youtube.svg" /></a> <a href="https://www.linkedin.com/company/bioconductor/" target="_blank"><img alt="LinkedIn Logo" src="/images/icons/svgs/linkedin.svg" /></a> <a href="https://bsky.app/profile/bioconductor.bsky.social" target="_blank"><img alt="Bluesky Logo" src="/images/icons/svgs/bluesky.svg" /></a> <a href="https://genomic.social/@bioconductor" target="_blank"><img alt="Mastodon Logo" src="/images/icons/svgs/mastodon.svg" /></a> <a href="https://blog.bioconductor.org/" target="_blank"><img alt="Blog Logo" src="/images/icons/svgs/arrow-circle-right-white.svg" /></a> </div> <img class="footer-logo" src="/images/logo/svg/BC-Logo-White.svg" alt="BioConductor Logo in White" /> </div> </div> </div> </footer> </body> </html>