map_mean_similarity_to_gradient: Map mean similarity of cell lines to k nearest tumors to...

View source: R/map_mean_similarity_to_gradient.R

map_mean_similarity_to_gradientR Documentation

Map mean similarity of cell lines to k nearest tumors to create a gradient from color 1 to color 2

Description

Map mean similarity of cell lines to k nearest tumors to create a gradient from color 1 to color 2

Usage

map_mean_similarity_to_gradient(
  mean_similarity_cell_line_to_k_nearest_tumors,
  mean_similarity_tumor_to_k_nearest_tumors,
  col1 = "orange",
  col2 = "blue",
  numshades = 100
)

Arguments

mean_similarity_cell_line_to_k_nearest_tumors

a vector of mean similarities for each cell line to k nearest tumors

mean_similarity_tumor_to_k_nearest_tumors

a vector of mean similarities for each tumor to k nearest tumors

col1

a color (DEFAULT: orange)

col2

a color (DEFAULT: blue)

numshades

the number of shades on the color scale (DEFAULT: 100)

Value

a vector of colors of length equal to mean_similarity_cell_line_to_k_nearest_tumors

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) 
  
result <- map_mean_similarity_to_gradient(
  mean_similarity_cell_line_to_k_nearest_tumors=
    categorization_list$mean_similarity_cell_line_to_k_nearest_tumors,
  mean_similarity_tumor_to_k_nearest_tumors=
    categorization_list$mean_similarity_tumor_to_k_nearest_tumors,
  col1="orange",
  col2="blue", 
  numshades=100)


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