match_style: Match chromosome naming styles of annotation and genome

View source: R/velocity.R

match_styleR Documentation

Match chromosome naming styles of annotation and genome

Description

Internal use. This function matches chromosome naming styles. It will also give the genome and the annotation the same genome slot. This function assumes that the annotation and the genome refer to the same version of genome. If more than one style, then the first element will be used.

Usage

match_style(Genome, annot, style)

Arguments

Genome

Either a BSgenome or a XStringSet object of genomic sequences, where the intronic sequences will be extracted from. Use genomeStyles to check which styles are supported for your organism of interest; supported styles can be interconverted. If the style in your genome or annotation is not supported, then the style of chromosome names in the genome and annotation should be manually set to be consistent.

annot

Genome annotation, an object of a class with a seqlevels method, such as GRanges, TxDb, and EnsDb.

style

Formatting of chromosome names. Use genomeStyles to check which styles are supported for your organism of interest and what those styles look like. This can also be a style supported for your organism different from the style used by the annotation and the genome. Then this style will be used for both the annotation and the genome. Can take the following values:

genome

If style of the annnotation is different from that of the genome, then the style of the genome will be used.

other

Custom style, need to manually ensure that the style in annotation matches that of the genome.

Ensembl

Or UCSC or NCBI, whichever is supported by your species of interest.

Value

A list of two. The first element is the genome with the proper style, and the second element is the annotation with the proper style.


lambdamoses/BUStoolsR documentation built on Aug. 1, 2024, 6:30 a.m.