Get a copy number matrix for all samples based on segmented data in the database.

get_cn_states(
  regions_list,
  regions_bed,
  region_names,
  these_samples_metadata,
  this_seq_type = "genome",
  all_cytobands = FALSE,
  use_cytoband_name = FALSE
)

Arguments

regions_list

A vector of regions in the format chrom:start-end.

regions_bed

A bed file with one row for each region you want to determine the CN state from.

region_names

Subset CN states on specific regions (gene symbols e.g FCGR2B).

these_samples_metadata

A metadata table to auto-subset the data to samples in that table before returning.

this_seq_type

Seq type for returned CN segments. One of "genome" (default) or "capture".

all_cytobands

Include all cytobands, default is set to FALSE. Currently only supports hg19.

use_cytoband_name

Use cytoband names instead of region names, e.g p36.33.

Value

Copy number matrix.

Details

This function returns CN states for the specified regions. For how to specify regions, refer to the parameter descriptions and function examples. Is this function not what you are looking for? Try one of the following, similar, functions; assign_cn_to_ssm, get_cn_segments, get_sample_cn_segments

Examples

#basic usage, generic lymphoma gene list
cn_matrix = get_cn_states(regions_bed=grch37_lymphoma_genes_bed)

myc_region <- gene_to_region(
 gene_symbol = "MYC",
 genome_build = "grch37",
 return_as = "region"
)
#> 1 region(s) returned for 1 gene(s)

single_gene_cn <- get_cn_states(
 regions_list = myc_region,
 region_names = "MYC"
)

# For capture
single_gene_cn <- get_cn_states(
 regions_list = myc_region,
 region_names = "MYC",
 this_seq_type = "capture"
)