Skip to content

Error on setting seqlevelsStyle(gal) <- "RefSeq" #105

@rcastelo

Description

@rcastelo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions