GenomeInfoDb
GenomeInfoDb copied to clipboard
Error on setting `seqlevelsStyle(gal) <- "RefSeq"`
hi,
setting seqlevelsStyle()
to RefSeq
works for, e.g., TxDb
objects, but it gives an error with GenomicAlignment
objects. Here is a minimal repex:
library(GenomicAlignments)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
seqlevelsStyle(txdb) <- "RefSeq" ## this seems to work fine
Warning message:
In (function (seqlevels, genome, new_style) :
cannot switch some hg38's seqlevels from UCSC to RefSeq style
head(seqnames(seqinfo(txdb)))
[1] "NC_000001.11" "NC_000002.12" "NC_000003.12" "NC_000004.12" "NC_000005.10"
[6] "NC_000006.12"
bamfile <- system.file("extdata", "ex1.bam", package="Rsamtools",mustWork=TRUE)
gal1 <- readGAlignments(bamfile)
seqlevelsStyle(gal1) <- "RefSeq" ## this prompts an error
Error in mapSeqlevels(x_seqlevels, value, drop = FALSE) :
supplied seqname style "RefSeq" is not supported
I guess if it is supported for TxDb
objects, it should be also supported for GenomicAlignment
objects.