Skip to content

Commit ee912d0

Browse files
authored
Merge pull request #167 from naupaka/bioconductor-revisions
Thanks to @naupaka for addressing the mega issue related to the Bioconductor section!
2 parents a9ce0d5 + e72f705 commit ee912d0

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

episodes/04-bioconductor-vcfr.Rmd

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ questions:
77
objectives:
88
- "Describe what the Bioconductor repository is and what it is used for"
99
- "Describe how Bioconductor differs from CRAN"
10-
- "Search Bioconductor for relevent packages"
10+
- "Search Bioconductor for relevant packages"
1111
- "Install a package from Bioconductor"
1212
keypoints:
1313
- "Bioconductor is an alternative package repository for bioinformatics packages."
1414
- "Installing packages from Bioconductor requires a new method, since it is not compatible with the `install.packages()` function used for CRAN."
15-
- "Check Bioconductor to see if there is a package relevent to your analysis before writing code yourself."
15+
- "Check Bioconductor to see if there is a package relevant to your analysis before writing code yourself."
1616
source: Rmd
1717
---
1818

@@ -21,17 +21,15 @@ source("../bin/chunk-options.R")
2121
knitr_fig_path("04-")
2222
```
2323

24-
<!-- example of rendered lesson https://datacarpentry.org/genomics-r-intro/02-r-basics/index.html -->
25-
2624
## Installing packages from somewhere else besides CRAN?
2725

28-
In some cases, you may want to use a specialized package that is not hosted on [CRAN](https://cran.r-project.org/) (the Comprehensive R Archive Network). This may be because the package is so new that it hasn't yet been submitted to CRAN, or it could be that it is on a focal topic that has an alternative repository. One major example of an alternative repository source is [Bioconductor](https://bioconductor.org/), which has a mission of "promot[ing] the statistical analysis and comprehension of current and emerging high-throughput biological assays." This means that many if not all of the packages available on Bioconductor are focused on the analysis of biological data, and that it can be a great place to look for tools to help you analyze your -omics datasets!
26+
So far we have told you about using packages that are included in the base installation of R (this is what comes with R 'out of the box'), and packages that you can install from [CRAN](https://cran.r-project.org/) (the Comprehensive R Archive Network), which is the primary place many people look for supplemental R packages to install. However, not all R packages are available on CRAN. For bioinformatics-related packages in particular, there is another repository that has many powerful packages that you can install. It is called [Bioconductor](https://bioconductor.org/) and it is a repository specifically focused on bioinformatics packages. [Bioconductor](https://bioconductor.org/) has a mission of "promot[ing] the statistical analysis and comprehension of current and emerging high-throughput biological assays." This means that many if not all of the packages available on Bioconductor are focused on the analysis of biological data, and that it can be a great place to look for tools to help you analyze your -omics datasets!
2927

3028
## So how do I use it?
3129

3230
Since access to the [Bioconductor](https://bioconductor.org/) repository is not built in to base R 'out of the box', there are a couple steps needed to install packages from this alternative source. We will work through the steps (only 2!) to install a package to help with the VCF analysis we are working on, but you can use the same approach to install any of the many thousands of available packages.
3331

34-
![screenshot of bioconductor homepage](fig/bioconductor_website_screenshot.jpg)
32+
![screenshot of bioconductor homepage](../fig/bioconductor_website_screenshot.jpg)
3533

3634
## First, install the `BiocManager` package
3735

@@ -49,13 +47,19 @@ To check if this worked (and also so you can make a note of the version for repr
4947
BiocManager::version()
5048
```
5149

52-
# Second, install the vcfR package from Bioconductor using `BiocManager`
50+
## Second, install the vcfR package from Bioconductor using `BiocManager`
51+
52+
> ## Head's Up: Installing vcfR may take a while due to numerous dependencies
53+
>
54+
> Just be aware that installing packages that have many dependencies can take a while.
55+
>
56+
{: .callout}
5357

5458
```{r install-vcfR, eval = FALSE}
5559
# install the vcfR package from bioconductor using BiocManager::install()
5660
BiocManager::install("vcfR")
5761
```
58-
You may need to also allow it to install some dependencies or update installed packages in order to successfully complete the process.
62+
Depending on your particular system, you may need to also allow it to install some dependencies or update installed packages in order to successfully complete the process.
5963

6064
> ## Note: Installing packages from Bioconductor vs from CRAN
6165
> Some packages begin by being available only on Bioconductor, and then later
@@ -74,7 +78,7 @@ You may need to also allow it to install some dependencies or update installed p
7478
{: .callout}
7579

7680

77-
# Search for Bioconductor packages based on your analysis needs
81+
## Search for Bioconductor packages based on your analysis needs
7882

7983
While we are only focusing in this workshop on VCF analyses, there are hundreds or thousands of different types of data and analyses that bioinformaticians may want to work with. Sometimes you may get a new dataset and not know exactly where to start with analyzing or visualizing it. The Bioconductor package search view can be a great way to browse through the packages that are available.
8084

@@ -98,13 +102,18 @@ vcf files in R.
98102

99103
> ## Challenge
100104
>
101-
> Add code chunks to
105+
> - Use the `BiocManager::available()` function to see what packages are available matching a search term.
106+
> - Use the [biocViews](https://bioconductor.org/packages/release/BiocViews.html#___Software) interface to search for packages of interest.
102107
>
103-
> - Install the `BiocManager` package
104-
> - Use that package's `install()` function to install `vcfR`
105-
> - Browse the Bioconductor website to find a second package, and install it
108+
> You may or may not want to try installing the package, since not all dependencies always install easily. However, this will at least let you see what is available.
106109
{: .challenge}
107110

111+
> ## Tip: Refreshing the RStudio package view after installing
112+
>
113+
> If you install a package from Bioconductor, you may need to refresh the RStudio package view to see it in your list. You can do this by clicking the "Refresh" button in the Packages pane of RStudio.
114+
>
115+
{: .callout}
116+
108117
## Resources
109118

110119
- [Bioconductor](https://bioconductor.org/)

0 commit comments

Comments
 (0)