Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmorin committed Nov 4, 2024
1 parent 2e67717 commit 9460faf
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 48 deletions.
31 changes: 23 additions & 8 deletions R/circular_CN_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
#'
#' @param pretty_CN_heatmap_output
#' @param ideogram
#' @param labelTheseGenes
#' @param track_height Change this to increase/decrease the height of the tracks. (0.1)
#' @param labelTheseGenes Specify a vector of gene names to label in the plot
#' @param del_col Optionally specify a different colour to use for the CNV deletion track
#' @param gain_col Optionally specify a different colour to use for the CNV gain track
#' @param calculate_correlations Experimental! Calculate the correlation between CNVs between different chromosomes and link highly correlated regions
#' @param min_correlation Minimum correlation to consider when plotting links
#' @param max_neg_correlation Maximum negative value for correlations <1 to consider when plotting links
#' @param link_transparency Specify a different alpha to increase or decrease the transparency of links
#'
#'
#' @return
#' @return Nothing
#' @export
#'
#' @examples
Expand All @@ -22,7 +30,6 @@ circular_CN_plot = function(pretty_CN_heatmap_output,
del_col="#0000FF80",
gain_col="#FF000080",
calculate_correlations = FALSE,
return_correlations = FALSE,
link_transparency=0.8,
labelTheseGenes = c("CD58","TLR2",
"MCL1","CDKN2A",
Expand Down Expand Up @@ -134,9 +141,6 @@ circular_CN_plot = function(pretty_CN_heatmap_output,



#return(list(bed1,bed2,correlations))
#Heatmap(correlations,row_split=bin_chroms,
# column_split = bin_chroms,cluster_rows=F,cluster_columns=F,show_row_names = F,show_column_names = F)
chroms_u = unique(bin_chroms)
xlims = matrix(ncol=2,nrow=length(chroms_u))
rownames(xlims)=chroms_u
Expand Down Expand Up @@ -294,12 +298,23 @@ circular_CN_plot = function(pretty_CN_heatmap_output,

#' Categorize arm-level and chromosomal CNV events
#'
#' @param pretty_CN_heatmap_output
#' @param pretty_CN_heatmap_output The output from running the pretty_CN_heatmap function
#'
#' @return
#' @return List of data frames
#' @export
#'
#' @examples
#'
#' cn_out = pretty_CN_heatmap(cn_state_matrix=all_states_binned,
#' scale_by_sample = T,
#' these_samples_metadata = all_genome_meta,
#' metadataColumns = c("pathology","seq_type"),
#' return_data = T)
#'
#' aneuploidies = categorize_CN_events(cn_out)
#'
#'
#'
categorize_CN_events = function(pretty_CN_heatmap_output){
CN_mat = pretty_CN_heatmap_output$data
labels = pretty_CN_heatmap_output$labels
Expand Down
2 changes: 1 addition & 1 deletion R/pretty_CN_heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @param cluster_columns Set to TRUE to enable clustering of genomic regions (columns) based on their CN value across all patients in the heatmap
#' @param cluster_rows Set to TRUE to enable clustering of genomic regions (columns) based on their CN value across all regions in the heatmap
#' @param sortByBins Optional: A vector containing one or more names of genomic bins that will be used to order the heatmap rows.
#' @param sortByPGA
#' @param sortByPGA Optional: Sort the rows based on percent genome altered (PGA) instead of the other options
#' @param splitByBinState Optional: A single genomic bin that will be used to split the heatmap based on the CN state of that bin
#' @param sortByMetadataColumns A vector containing one or more names of columns from your metadata that will be used to order the rows overall or within slices (if combined with splitByBinState or geneBoxPlot)
#' @param labelTheseGenes A vector of Hugo gene symbols whose location will be indicated on the top of the heatmap
Expand Down
12 changes: 7 additions & 5 deletions R/pretty_circular_mutation_frequency_heatmap.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#' pretty_circular_mutation_frequency_heatmap
#'
#' @param prettyOncoplot_output
#' @param genes
#' @param keep_these_pathologies
#' @param min_sample_num
#' @param prettyOncoplot_output The output of the prettyOncoplot function
#' @param cn_status_matrix The output of get_cn_states
#' @param collated_results A list of data frames with sample_id as rownames and features as column names
#' @param genes A vector of genes to label
#' @param keep_these_pathologies A vector of pathology values to show in the plot. All the remaining rows will be ignored.
#' @param min_sample_num Minimum number of samples in a pathology to be considered for the plot. Pathologies with less than this number will be excluded. (20)
#'
#' @return
#' @return Nothing or a list of data frames (when return_data = TRUE)
#' @export
#'
#' @examples
Expand Down
18 changes: 17 additions & 1 deletion man/categorize_CN_events.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions man/circular_CN_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions man/pretty_CN_heatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 32 additions & 25 deletions man/pretty_circular_mutation_frequency_heatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9460faf

Please sign in to comment.