gr.fix: "Fixes" 'seqlengths' / 'seqlevels'

gr.fixR Documentation

"Fixes" seqlengths / seqlevels

Description

If "genome" not specified will replace NA seqlengths in GRanges to reflect largest coordinate per seqlevel and removes all NA seqlevels after this fix.

If "genome" defined (i.e. as Seqinfo object, or a BSgenome, GRanges, GRangesList object with populated seqlengths), then will replace seqlengths in gr with those for that genome

Usage

gr.fix(gr, genome = NULL, gname = NULL, drop = FALSE, pruning.mode = "coarse")

Arguments

gr

GRanges object to fix

genome

Genome to fix to: Seqinfo, BSgenome, GRanges (w/seqlengths), GRangesList (w/seqlengths) (default = NULL)

gname

string Name of the genome (optional, just appends to Seqinfo of the output) (default = NULL)

drop

boolean Remove ranges that are not present in the supplied genome (default = FALSE)

pruning.mode

string Controls how to prune x. Four pruning modes are currently defined: "error", "coarse", "fine", and "tidy". See GenomeInfoDb documentation.

Value

GRanges pile with the fixed Seqinfo


mskilab/gUtils documentation built on June 6, 2023, 12:08 a.m.