Loading reference genome from BSgenome
1
0
Entering edit mode
20 months ago
jensen.416 • 0

I am trying to run an analysis via the MutationalPatterns package. The first step is to install the BSgenome package, and then load a reference genome from BSgenome:

library("BSgenome")
ref_genome <- "BSgenome.Mmusculus.UCSC.mm39"
library(ref_genome, character.only = TRUE)

When I run my script, it gets hung up on the last line and returns the following error:

Error in library(ref_genome, character.only = TRUE, verbose = TRUE) : 
there is no package called ‘BSgenome.Mmusculus.UCSC.mm39’

I have verified that BSgenome installed. I have tried several other ref genomes within BSgenome and received the same error. I had the thought of trying to download the reference genome and use it directly from my server, but I haven't found how to successfully incorporate it into my script. I was wondering if someone more experienced with R than I might have an idea of what I may be doing wrong.

BSgenome R fasta MutationalPatterns • 995 views
ADD COMMENT
4
Entering edit mode
20 months ago
MatthewP ★ 1.4k

Hello, you need to install "BSgenome.Mmusculus.UCSC.mm39" in R:

BiocManager::install("BSgenome.Mmusculus.UCSC.mm39")
ADD COMMENT

Login before adding your answer.

Traffic: 2207 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