Skip to content

Commit

Permalink
load biocmoanager
Browse files Browse the repository at this point in the history
  • Loading branch information
AtaJadidAhari committed Jan 13, 2025
1 parent 55bb048 commit b3f7762
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/testthat/test_updateSeqlevelsStyle.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
context("Test updateSeqlevelsStyle function")
library(BiocManager)

test_that("hg38, UCSC to NCBI", {
install("BSgenome.Hsapiens.UCSC.hg38")
BiocManager::install("BSgenome.Hsapiens.UCSC.hg38")
genome <- getBSgenome("hg38")
bsgenome <- genome

Expand All @@ -13,19 +14,19 @@ test_that("hg38, UCSC to NCBI", {
})

test_that("hg38, NCBI to UCSC", {
install("BSgenome.Hsapiens.NCBI.GRCh38")
BiocManager::install("BSgenome.Hsapiens.NCBI.GRCh38")
genome <- getBSgenome("GRCh38")
bsgenome <- genome

seqlevelsStyle(bsgenome) <- "UCSC"
genome <- updateSeqlevelsStyle(genome, metadata(genome)$genome, "UCSC", metadata(genome)$provider, "./")
BiocManager::genome <- updateSeqlevelsStyle(genome, metadata(genome)$genome, "UCSC", metadata(genome)$provider, "./")

expect_equal(seqnames(genome), seqnames(bsgenome))

})

test_that("hg19, NCBI to UCSC", {
install("BSgenome.Hsapiens.1000genomes.hs37d5")
BiocManager::install("BSgenome.Hsapiens.1000genomes.hs37d5")
genome <- getBSgenome("hs37d5")
bsgenome <- genome

Expand All @@ -37,7 +38,7 @@ test_that("hg19, NCBI to UCSC", {
})

test_that("hg19, UCSC to NCBI", {
install("BSgenome.Hsapiens.UCSC.hg19")
BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")
genome <- getBSgenome("hg19")
bsgenome <- genome

Expand Down

0 comments on commit b3f7762

Please sign in to comment.