get_gene_copy_numbers: get_gene_copy_numbers

get_gene_copy_numbersR Documentation

get_gene_copy_numbers

Description

Takes a jabba_rds output and returns a GRanges with the genes that have either amplifications or deletions

Usage

get_gene_copy_numbers(
  gg,
  gene_ranges,
  nseg = NULL,
  gene_id_col = "gene_id",
  simplify_seqnames = FALSE,
  mfields = c("gene_name", "source", "gene_id", "gene_type", "level", "hgnc_id",
    "havana_gene"),
  output_type = "data.table"
)

Arguments

gg

either path to rds of a gGraph or an object containing the gGraph with JaBbA output

gene_ranges

GRanges of genes (must contain field "gene_name"). Alternatively a path to a file that could be parsed by rtracklayer::import (such as gtf) is acceptable.

nseg

GRanges with field "ncn" - the normal copy number (if not provided then ncn = 2 is used)

gene_id_col

the name of the column to be used in order to identify genes (must be unique for each gene, so usually "gene_name" is not the right choice).

simplify_seqnames

when set to TRUE, then gr.sub is ran on the seqnames of the gGraph segments and the genes GRanges

mfields

the metadata fields that the output should inherit from the genes GRanges

output_type

either GRanges or data.table

Value

GRanges or data.table with genes CN

Author(s)

Alon Shaiber


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.