View source: R/has_consistentSeqLevels.R
has_consistentSeqlevels | R Documentation |
This function will determine if all input ranges objects have the same chromosome naming convention. Input objects can be GenomicRanges, BSgenome or Biostrings object with seqlevel information.
has_consistentSeqlevels(..., verbose = TRUE)
... |
Two or more objects with seqlevels information |
verbose |
Whether to print out message |
Logical value as to whether all objects have consistent seqlevel styles
Fursham Hamid
## ---------------------------------------------------------------------
## EXAMPLE USING TOY DATASET
## ---------------------------------------------------------------------
require(GenomicRanges)
## Create toy GRanges objects
gr1 <- GRanges("1", IRanges(start = c(1, 101), width = c(20, 20)), "+")
gr2 <- GRanges("chr1", IRanges(start = c(1, 101), width = c(20, 20)), "+")
## Test for seqlevels consistency
has_consistentSeqlevels(gr1, gr2)
## Input can be a Biostrings object with seqlevels information
x0 <- c("chr2" = "CTCACCAGTAT", "chr3" = "TGTCAGTCGA")
dna <- Biostrings::DNAStringSet(x0)
## Test for seqlevels consistency
has_consistentSeqlevels(gr1, dna)
has_consistentSeqlevels(gr2, dna)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.