findGRangesCols: Obtain minimum necessary names for the creation of a...

findGRangesColsR Documentation

Obtain minimum necessary names for the creation of a GRangesList object

Description

This function attempts to match chromosome, start position, end position and strand names in the given character vector. Modified helper from the GenomicRanges package.

Usage

findGRangesCols(
  df_colnames,
  seqnames.field = c("seqnames", "seqname", "chromosome", "chrom", "chr",
    "chromosome_name", "seqid", "om"),
  start.field = "start",
  end.field = c("end", "stop"),
  strand.field = "strand",
  ignore.strand = FALSE
)

Arguments

df_colnames

A character vector of names in a dataset

seqnames.field

A character vector of the chromosome name

start.field

A character vector that indicates the column name of the start positions of ranged data

end.field

A character vector that indicates the end position of ranged data

strand.field

A character vector of the column name that indicates the strand type

ignore.strand

logical (default FALSE) whether to ignore the strand field in the data

Value

Index positions vector indicating columns with appropriate names

Examples

myDataColNames <- c("Start_position", "End_position", "strand",
                 "chromosome", "num_probes", "segment_mean")
findGRangesCols(myDataColNames)


waldronlab/TCGAmisc documentation built on Dec. 19, 2024, 2:10 p.m.