checkChrName {methyAnalysis} | R Documentation

## check chromosome names

### Description

Check chromosome names and make sure chromosome names start with "chr" (or not if addChr is FALSE)

### Usage

    checkChrName(grange, addChr = TRUE)

### Arguments

`grange` | a GRanges, RangedData object, character or named vector
`addChr` | Whether to add "chr" in front of chromosome names

### Details

Because some annotation database names the chromosomes without "chr" prefix, while many others do, it causes problems when both types of data exist in the analysis. This function aims to resolve such issues by checking chromosome names and make sure chromosome names start with "chr" (or not if addChr is FALSE).

### Value

return the same type of object with chromosome names checked.

### Author(s)

Pan Du

### Examples

    data(exampleMethyGenoSet)
    seqlevels(rowRanges(exampleMethyGenoSet))

    tt <- checkChrName(exampleMethyGenoSet, addChr = TRUE)
    seqlevels(rowRanges(tt))

[Package methyAnalysis version 1.28.0 Index]