Skip to content

Commit 5b9c386

Browse files
committed
VariantAnnotation 1.55.1: Depends on Seqinfo instead of GenomeInfoDb
1 parent 4e5e6a2 commit 5b9c386

File tree

10 files changed

+25
-18
lines changed

10 files changed

+25
-18
lines changed

DESCRIPTION

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Type: Package
33
Title: Annotation of Genetic Variants
44
Description: Annotate variants, compute amino acid coding changes,
55
predict coding outcomes.
6-
Version: 1.55.0
6+
Version: 1.55.1
77
Authors@R: c(
88
person("Valerie", "Oberchain", role="aut"),
99
person("Martin", "Morgan", role="aut"),
@@ -13,13 +13,13 @@ Authors@R: c(
1313
email="maintainer@bioconductor.org"))
1414
License: Artistic-2.0
1515
Depends: R (>= 4.0.0), methods, BiocGenerics (>= 0.37.0), MatrixGenerics,
16-
GenomeInfoDb (>= 1.15.2), GenomicRanges (>= 1.41.5),
17-
SummarizedExperiment (>= 1.19.5), Rsamtools (>= 2.19.1)
16+
Seqinfo, GenomicRanges (>= 1.61.1),
17+
SummarizedExperiment (>= 1.39.1), Rsamtools (>= 2.25.1)
1818
Imports: utils, DBI, Biobase, S4Vectors (>= 0.27.12),
19-
IRanges (>= 2.23.9), XVector (>= 0.29.2), Biostrings (>= 2.57.2),
20-
AnnotationDbi (>= 1.27.9), rtracklayer (>= 1.39.7),
21-
BSgenome (>= 1.47.3), GenomicFeatures (>= 1.31.3)
22-
Suggests: RUnit, AnnotationHub, BSgenome.Hsapiens.UCSC.hg19,
19+
IRanges (>= 2.23.9), XVector (>= 0.29.2), Biostrings (>= 2.77.2),
20+
AnnotationDbi (>= 1.27.9), rtracklayer (>= 1.69.1),
21+
BSgenome (>= 1.77.1), GenomicFeatures (>= 1.61.4)
22+
Suggests: GenomeInfoDb, RUnit, AnnotationHub, BSgenome.Hsapiens.UCSC.hg19,
2323
TxDb.Hsapiens.UCSC.hg19.knownGene,
2424
SNPlocs.Hsapiens.dbSNP144.GRCh37, SIFT.Hsapiens.dbSNP132,
2525
SIFT.Hsapiens.dbSNP137, PolyPhen.Hsapiens.dbSNP131, snpStats,

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import(BiocGenerics)
77
importFrom(MatrixGenerics, rowRanges)
88
import(S4Vectors)
99
import(IRanges)
10-
import(GenomeInfoDb)
10+
import(Seqinfo)
1111
import(GenomicRanges)
1212
import(SummarizedExperiment)
1313
import(Rsamtools)

R/methods-VCF-class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ SnpMatrixToVCF <- function(from, seqSource)
472472
## match seqlevels style to seqSource
473473
map <- from$map
474474
chr <- as.character(map$chromosome)
475-
seqlevelsStyle(chr) <- seqlevelsStyle(seqSource)
475+
GenomeInfoDb::seqlevelsStyle(chr) <- GenomeInfoDb::seqlevelsStyle(seqSource)
476476
uniqueChr <- unique(chr)
477477
if (any(invalid <- !uniqueChr %in% seqlevels(seqSource)))
478478
stop("seqlevels not found in 'seqSource': ",

inst/unitTests/test_VRanges-class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ test_VRanges_vcf <- function() {
248248

249249
vrA <- vr[sampleNames(vr) == "A"]
250250
runValue(sampleNames(vrA)) <- factor(runValue(sampleNames(vrA)))
251-
vrA <- keepSeqlevels(vrA, unique(as.character(seqnames(vrA))))
251+
seqlevels(vrA) <- unique(as.character(seqnames(vrA)))
252252
writeVcf(vrA, dest)
253253
vcfA <- readVcf(dest, genome = "hg19")
254254
vcfA.vr <- as(vcfA, "VRanges")

inst/unitTests/test_locateVariants-methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test_locateVariants_queryAsVCF <- function()
3131
{
3232
fl <- system.file("extdata", "gl_chr1.vcf", package="VariantAnnotation")
3333
vcf <- readVcf(fl, "hg19")
34-
vcf <- renameSeqlevels(vcf, c("1" = "chr1"))
34+
seqlevels(vcf) <- c("1" = "chr1")
3535
loc1 <- locateVariants(vcf, txdb, IntergenicVariants())
3636
loc2 <- locateVariants(rowRanges(vcf), txdb, IntergenicVariants())
3737
checkIdentical(loc1, loc2)

man/VCF-class.Rd

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,18 @@ identical(geno(vcf)$GQ, geno(vcf)[[2]])
464464
seqlevels(vcf)
465465

466466
## Rename the seqlevels to start with 'chr'.
467-
vcf2 <- renameSeqlevels(vcf, paste0("chr", seqlevels(vcf)))
467+
vcf2 <- vcf
468+
seqlevels(vcf2) <- paste0("chr", seqlevels(vcf2))
468469
seqlevels(vcf2)
469470

470-
## The VCF can also be subset by seqlevel using 'keepSeqlevels'
471-
## or 'dropSeqlevels'. See ?keepSeqlevels for details.
472-
vcf3 <- keepSeqlevels(vcf2, "chr2", pruning.mode="coarse")
471+
## Dropping some of the seqlevels can have the effect of reducing
472+
## the length of the VCF object by keeping only its elements that
473+
## belong to the remaining seqlevels.
474+
vcf3 <- vcf2
475+
length(vcf3)
476+
seqlevels(vcf3, pruning.mode="coarse") <- "chr2"
473477
seqlevels(vcf3)
478+
length(vcf3)
474479

475480
## ----------------------------------------------------------------
476481
## Header information

man/filterVcf-methods.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ if (require(TxDb.Hsapiens.UCSC.hg19.knownGene)) {
9898
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
9999
exons <- exons(txdb)
100100
exons22 <- exons[seqnames(exons) == "chr22"]
101+
102+
library(GenomeInfoDb)
101103
seqlevelsStyle(exons22) <- "NCBI" ## match chrom names in VCF file
102104

103105
## Range-based filter:

man/locateVariants-methods.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ locateVariants(query, subject, region, ...)
258258
intersect(seqlevels(vcf), seqlevels(txdb))
259259

260260
## Rename seqlevels with renameSeqlevesl().
261-
vcf <- renameSeqlevels(vcf, paste0("chr", seqlevels(vcf)))
261+
seqlevels(vcf) <- paste0("chr", seqlevels(vcf))
262262

263263
## Confirm.
264264
intersect(seqlevels(vcf), seqlevels(txdb))

man/predictCoding-methods.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
vcf <- readVcf(fl, "hg19")
192192

193193
## Rename seqlevels in the VCF object to match those in the TxDb.
194-
vcf <- renameSeqlevels(vcf, "chr22")
194+
seqlevels(vcf) <- "chr22"
195195
## Confirm common seqlevels
196196
intersect(seqlevels(vcf), seqlevels(txdb))
197197

man/seqinfo-method.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
\author{Lori Shepherd}
2929

3030
\seealso{
31-
\code{\link{VcfFile}}, \code{\link[GenomeInfoDb]{Seqinfo}}
31+
\code{\link{VcfFile}}, \code{\link[Seqinfo]{Seqinfo}}
3232
}
3333

3434
\examples{

0 commit comments

Comments
 (0)