harmonize_seqlengths {seqsetvis} | R Documentation

## harmonize_seqlengths

### Description

ensures compatibility between seqlength of gr and bam_file based on header

### Usage

    harmonize_seqlengths(gr, bam_file)

### Arguments

`gr` | GRanges, object to harmonize seqlengths for
`bam_file` | character, a path to a valid bam file

### Value

gr with seqlengths matching bam_file

### Examples

    library(GenomicRanges)
    gr = GRanges("chr1", IRanges(1, 100))
    #seqlengths has not been set
    seqlengths(gr)
    bam = system.file("extdata/test.bam", package = "seqsetvis")
    gr2 = harmonize_seqlengths(gr, bam)
    #seqlengths now set
    seqlengths(gr2)

[Package seqsetvis version 1.10.0 Index]