standardize_segs: Takes and returns segs data frame standardized to a single...

standardize_segsR Documentation

Takes and returns segs data frame standardized to a single format

Description

Takes and returns segs data frame standardized to a single format (i.e. $chr, $pos1, $pos2)

If chr = TRUE will ensure "chr" prefix is added to chromossome(if does not exist)

"segs" data.frame can obey any number of conventions to specify chrom, start, and end of ranges (e.g. $pos1, $pos2, $Start_position, $End_position)

Conventions:

  • ID - 'id', 'patient', 'sample'

  • chr - 'seqnames', 'chrom', 'chromosome', 'rname', 'space', 'contig'

  • pos1 - 'start', 'loc.start', 'start.bp', 'start_position', 'begin', 'pos', 'pos1', 'left', 's1'

  • pos2 - 'end', 'loc.end', 'stop', 'end.bp', 'end_posiiton', 'pos2', 'right', 'e1'

  • sstrand - 'strand', 'str'

Usage

standardize_segs(seg, chr = FALSE)

Arguments

seg

data.frame or data.table or GRanges of segments with fields denoting chromosome, start, end, and other metadata.

chr

boolean Flag to force add chromosomes (default = FALSE)

Value

data.frame or data.table with standardized segments


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