get_cn_states.Rd
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
)
A vector of regions in the format chrom:start-end.
A bed file with one row for each region you want to determine the CN state from.
Subset CN states on specific regions (gene symbols e.g FCGR2B).
A metadata table to auto-subset the data to samples in that table before returning.
Seq type for returned CN segments. One of "genome" (default) or "capture".
Include all cytobands, default is set to FALSE. Currently only supports hg19.
Use cytoband names instead of region names, e.g p36.33.
Copy number matrix.
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
#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"
)