-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into danknight-missing-edge
- Loading branch information
Showing
14 changed files
with
232 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: CancerEvolutionVisualization | ||
Title: Publication Quality Phylogenetic Tree Plots | ||
Version: 2.1.0 | ||
Date: 2024-07-19 | ||
Date: 2024-07-31 | ||
Authors@R: c( | ||
person("Paul Boutros", role = "cre", email = "[email protected]"), | ||
person("Adriana Salcedo", role = "aut"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
\docType{data} | ||
\name{GRCh37} | ||
\alias{GRCh37} | ||
\title{GRCh37 Chromosom Information} | ||
\description{Chromosome information for the GRCh37 genome build. Used for plotting.} | ||
\format{data.frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
\docType{data} | ||
\name{GRCh38} | ||
\alias{GRCh38} | ||
\title{GRCh38 Chromosom Information} | ||
\description{Chromosome information for the GRCh38 genome build. Used for plotting.} | ||
\format{data.frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
\name{create.ccf.heatmap} | ||
\alias{create.ccf.heatmap} | ||
\title{Subclone Tree Plot} | ||
\description{ | ||
Creates a heatmap of cancer cell fraction (CCF) distribution across tumour samples. The function is a wrapper around \code{BoutrosLab.plotting.general::create.heatmap()} with some changes in the default parameters. All parameter description are the same as in \code{BoutrosLab.plotting.general::create.heatmap()} except for \code{ccf.thres}. | ||
} | ||
\usage{ | ||
create.ccf.heatmap( | ||
x, | ||
ccf.thres = NULL, | ||
cluster.dimensions = 'both', | ||
clustering.method = 'complete', | ||
distance.method = 'euclidean', | ||
xaxis.lab = '', | ||
xlab.label = 'Mutations', | ||
print.colour.key = FALSE, | ||
colour.scheme = c('white', 'blue'), | ||
... | ||
) | ||
} | ||
\arguments{ | ||
\item{x}{Either a data-frame or a matrix from which the heatmap is to created} | ||
\item{ccf.thres}{CCF threshold to be applied to the heatmap. Values below the threshold will be set to 0. Defaults to \code{NULL}} | ||
\item{cluster.dimensions}{Defaults to \dQuote{both}.} | ||
\item{clustering.method}{Defaults to \dQuote{complete}.} | ||
\item{distance.method}{Defaults to \dQuote{euclidean}.} | ||
\item{xaxis.lab}{Defaults to an empty string.} | ||
\item{xlab.label}{Defaults to \dQuote{Mutations}.} | ||
\item{print.colour.key}{Defaults to \code{FALSE}.} | ||
\item{colour.scheme}{Defaults to \code{c('white', 'blue')}.} | ||
\item{...}{Pass through argument. See BoutrosLab.plotting.general::create.heatmap() for further details.} | ||
} | ||
\value{A `grob` object of the heatmap.} | ||
\author{Helena Winata} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
\name{create.ccf.summary.heatmap} | ||
\alias{create.ccf.summary.heatmap} | ||
\title{Subclone Tree Plot} | ||
\description{ | ||
Creates a heatmap of cancer cell fraction (CCF) distribution across tumour samples with clone IDs as a covariate beneath the heatmap. Subplot parameters controls the appearance of the heatmap and barplots. See \code{BoutrosLab.plotting.general::create.barplot()} or \code{BoutrosLab.plotting.general::create.heatmap()} for parameter description. Legend parameters are passed to \code{BoutrosLab.plotting.general::legend.grob()}. | ||
} | ||
|
||
\usage{ | ||
create.ccf.summary.heatmap( | ||
DF, | ||
ccf.thres = NULL, | ||
median.col = 'median.ccf.per.sample', | ||
clone.order = NULL, | ||
sample.order = NULL, | ||
hm.col.scheme = c('white', 'blue'), | ||
subplot.xlab.cex = 1.2, | ||
subplot.xaxis.cex = 1, | ||
subplot.xaxis.fontface = 'bold', | ||
subplot.xaxis.rot = 90, | ||
subplot.ylab.cex = 1.2, | ||
subplot.yaxis.cex = 1, | ||
subplot.yaxis.fontface = 'bold', | ||
hm.xaxis.rot = 90, | ||
legend.size = 3, | ||
legend.title.cex = 1.2, | ||
legend.label.cex = 1, | ||
... | ||
); | ||
} | ||
\arguments{ | ||
\item{DF}{A data-frame with the following column names: 'ID', 'SNV.id', 'clone.id', 'CCF'.} | ||
\item{ccf.thres}{CCF threshold to be applied to the heatmap. Values below the threshold will be set to 0. Defaults to \code{NULL}} | ||
\item{median.col}{Defaults to \dQuote{median.ccf.per.sample}} | ||
\item{clone.order}{Defaults to \code{NULL}} | ||
\item{sample.order}{Defaults to \code{NULL}} | ||
\item{hm.col.scheme}{Heatmap colour scheme. Defaults to \code{c('white', 'blue')}} | ||
\item{subplot.xlab.cex}{Subplot parameter. Defaults to 1.2} | ||
\item{subplot.xaxis.cex}{Subplot parameter. Defaults to 1} | ||
\item{subplot.xaxis.fontface}{Subplot parameter. Defaults to \dQuote{bold}} | ||
\item{subplot.xaxis.rot}{Subplot parameter. Defaults to 90} | ||
\item{subplot.ylab.cex}{Subplot parameter. Defaults to 1.2} | ||
\item{subplot.yaxis.cex}{Subplot parameter. Defaults to 1} | ||
\item{subplot.yaxis.fontface}{Subplot parameter. Defaults to \dQuote{bold}} | ||
\item{hm.xaxis.rot}{Subplot parameter. Defaults to 90} | ||
\item{legend.size}{Legend parameter. Defaults to 3} | ||
\item{legend.title.cex}{Legend parameter. Defaults to 1.2} | ||
\item{legend.label.cex}{Legend parameter. Defaults to 1} | ||
\item{...}{Pass through argument. See BoutrosLab.plotting.general::create.multipanelplot() for further details.} | ||
|
||
} | ||
\value{A `grob` object of the summary plot.} | ||
\author{Helena Winata} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
\name{create.clone.genome.distribution.plot} | ||
\alias{create.clone.genome.distribution.plot} | ||
\title{Create Clone Genome Distribution Plot} | ||
\description{ | ||
This function creates a plot showing the distribution of clones across the genome. It generates a scatter plot of the SNVs colored by clone ID and a density plot showing the density of each clone across the genome. The function can handle both single and multi-sample inputs. | ||
} | ||
\usage{ | ||
create.clone.genome.distribution.plot( | ||
snv.df, | ||
genome.build = 'GRCh37', | ||
clone.order = NULL, | ||
clone.colours = NULL, | ||
filename = NULL, | ||
multi.sample = FALSE, | ||
... | ||
) | ||
} | ||
\arguments{ | ||
\item{snv.df}{A data frame containing the SNV data. It must have columns 'chr', 'pos', and 'clone.id'. If \code{multi.sample = TRUE}, it must also have a column 'ID' specifying the sample ID for each SNV.} | ||
\item{genome.build}{The genome build to use. Defaults to \dQuote{GRCh37}.} | ||
\item{clone.order}{The order in which to plot the clones. If \code{NULL}, clones will be sorted alphabetically.} | ||
\item{clone.colours}{A named vector specifying the color to use for each clone. If \code{NULL}, colors will be automatically assigned.} | ||
\item{filename}{Directory or filepath to save the plot in. If \code{multi.sample = TRUE}, this must be a directory. if \code{multi.sample = FALSE}, this must be a filepath. If \code{NULL}, the plot will not be saved.} | ||
\item{multi.sample}{Logical indicating whether the input data contains multiple samples. Defaults to \code{FALSE}.} | ||
\item{...}{Additional arguments to be passed to \code{BoutrosLab.plotting.general::create.multipanelplot()}.} | ||
} | ||
\details{ | ||
This function preprocesses the input data frame, extracts chromosome information, and iterates over each sample to create a clone genome distribution plot. For each sample, it calculates the density of each clone across the genome and creates a scatter plot of the SNVs colored by clone ID and a density plot showing the density of each clone. | ||
} | ||
\value{A `grob` object.} | ||
\author{Helena Winata, Selina Wu} | ||
|
Oops, something went wrong.