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

Description Usage Arguments Value

View source: R/gUtils.R

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

1
2
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 Sept. 1, 2018, 8:21 p.m.