get_seqLen {InPAS}R Documentation

Get sequence lengths for chromosomes/scaffolds

Description

Get sequence lengths for chromosomes/scaffolds from a BSgenome::BSgenome object

Usage

get_seqLen(genome, removeScaffolds = FALSE)

Arguments

genome

An object of BSgenome::BSgenome

removeScaffolds

A logical(1) vector, whether the scaffolds should be removed from the genome. If you use a TxDb containing alternative scaffolds, you'd better to remove the scaffolds. To make things easy, we suggest users creating a BSgenome::BSgenome instance from the reference genome used for read alignment. For details, see the documentation of BSgenome::forgeBSgenomeDataPkg().

Value

A named numeric vector containing lengths per seqname, with the seqnames as the names

Author(s)

Jianhong Ou, Haibo Liu

See Also

GenomeInfoDb::Seqinfo

Examples

library(BSgenome.Mmusculus.UCSC.mm10)
genome <- BSgenome.Mmusculus.UCSC.mm10
InPAS:::get_seqLen(genome, removeScaffolds = FALSE)

[Package InPAS version 2.1.0 Index]