categorize_cell_lines: Categorize cell lines by the level of similarity to k-nearest...

View source: R/categorize_cell_lines.R

categorize_cell_linesR Documentation

Categorize cell lines by the level of similarity to k-nearest tumors

Description

Categorize cell lines by the level of similarity to k-nearest tumors

Usage

categorize_cell_lines(
  num_tumors_for_comparison = 10,
  dist_mat,
  cell_line_ids,
  tumor_ids,
  trim_cell_line_names = FALSE
)

Arguments

num_tumors_for_comparison

number of tumors used in a k-nearest neighbor comparison (DEFAULT: 10)

dist_mat

a matrix of pairwise weighted distances between all cell lines and tumors

cell_line_ids

IDs/names of cell lines

tumor_ids

IDs of tumors

trim_cell_line_names

a boolean whether to trim the the cell lines; this is optional and used for long cell line names in CCLE format (i.e. CELLLINE_TISSUE); (DEFAULT: FALSE)

Value

a list with the following items:

  • mean_similarity_cell_line_to_k_nearest_tumors: the mean similarity of each cell line to the k-nearest tumors

  • mean_similarity_tumor_to_k_nearest_tumors: the mean similarity of each tumor sample to the k-nearest tumors

  • categorization: a 2-column data.frame with the cell line categorizations: Sample_ID and Category; Category values can be: "Great", "Good", "Moderately Good", "Poor", "Outliers"

Author(s)

Rileen Sinha (rileen@gmail.com), Augustin Luna (aluna@jimmy.harvard.edu)

Examples

# Generated using: tumorcomparer::run_comparison() 
comparison_result <- readRDS(system.file("test_output", 
  "ov_comparison_result.rds", 
  package="tumorcomparer"))

categorization_list <- categorize_cell_lines(
  num_tumors_for_comparison=length(comparison_result$tumor_ids)-1, 
  dist_mat=comparison_result$dist_mat,
  cell_line_ids=comparison_result$cell_line_ids,
  tumor_ids=comparison_result$tumor_ids,
  trim_cell_line_names=FALSE) 


cannin/tumorcomparer documentation built on Feb. 7, 2023, 3:13 p.m.