I have one simple goal:
gr <- GRanges(seqnames = c("chr1", "chr2"), ranges = IRanges(start = 1:2, end = 4:5))
I want to change the chromosome names all to "chrX"
> seqnames(gr) <- "chrX" Error in .normalize_seqnames_replacement_value(value, x) : levels of supplied 'seqnames' must be identical to 'seqlevels(x)'
Please let me know if there is a simple way to do this.