Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
108 |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
109 |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Methods to get or set internal fields from the scCNA class
110 |
111 |
112 |
# S4 method for scCNA
113 | segment_ratios(x, withDimnames=TRUE)
114 |
115 |
116 |
117 |
118 |
119 |
Contents
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/images/copykit_cheat_sheet_DCM1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/navinlabcode/copykit/4c01249bb04cf2b481bdb3ae734a4ee9dd04a6b5/images/copykit_cheat_sheet_DCM1.png
--------------------------------------------------------------------------------
/images/copykit_hexsticker_v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/navinlabcode/copykit/4c01249bb04cf2b481bdb3ae734a4ee9dd04a6b5/images/copykit_hexsticker_v2.png
--------------------------------------------------------------------------------
/inst/WORDLIST:
--------------------------------------------------------------------------------
1 | CopyKit
2 | github
3 |
--------------------------------------------------------------------------------
/man/CopyKit-class.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/AllClasses.R
3 | \docType{class}
4 | \name{igraph-class}
5 | \alias{igraph-class}
6 | \alias{CopyKit-class}
7 | \alias{.CopyKit}
8 | \alias{CopyKit}
9 | \title{Placeholder for the igraph class}
10 | \usage{
11 | CopyKit(
12 | consensus = data.frame(),
13 | phylo = structure(list(), class = "phylo"),
14 | consensusPhylo = structure(list(), class = "phylo"),
15 | distMat = dist(matrix(0, 0, 0)),
16 | graph = igraph::graph.empty(),
17 | ...
18 | )
19 | }
20 | \arguments{
21 | \item{consensus}{A data frame with the consensus information.}
22 |
23 | \item{phylo}{A phylo object with a phylogenetic tree.}
24 |
25 | \item{consensusPhylo}{A phylo object with a phylogenetic consensus tree.}
26 |
27 | \item{graph}{A graph object with a graph made from the umap data.}
28 | }
29 | \value{
30 | A CopyKit class object.
31 | }
32 | \description{
33 | S4 Class that extends the Bioconductor SingleCellExperiment class to hold
34 | single cell copy number datasets.
35 | }
36 | \section{Slots}{
37 |
38 | \describe{
39 | \item{\code{phylo}}{Stores the single cell phylogenetic information with ape class
40 | phylo.}
41 |
42 | \item{\code{consensusPhylo}}{Stores the consensus phylogenetic information with
43 | ape class phylo.}
44 |
45 | \item{\code{distMat}}{Stores a distance matrix object used for graphs and heatmaps.}
46 |
47 | \item{\code{graph}}{Stores an igraph object for network based clustering.}
48 |
49 | \item{\code{consensus}}{stores a consensus data frame from
50 | \code{\link{calcConsensus}.}}
51 | }}
52 |
53 | \references{
54 | The Bioconductor SingleCellExperiment Class
55 | DOI: 10.18129/B9.bioc.SingleCellExperiment
56 | }
57 | \keyword{internal}
58 |
--------------------------------------------------------------------------------
/man/calcConsensus.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/calcConsensus.R
3 | \name{calcConsensus}
4 | \alias{calcConsensus}
5 | \title{Calculate a consensus matrix of segment means based on \code{colData}}
6 | \usage{
7 | calcConsensus(
8 | scCNA,
9 | assay = "segment_ratios",
10 | consensus_by = "subclones",
11 | fun = c("median", "mean"),
12 | BPPARAM = bpparam()
13 | )
14 | }
15 | \arguments{
16 | \item{scCNA}{The CopyKit object.}
17 |
18 | \item{assay}{String with the name of the assay to pull data from to calculate
19 | the consensus matrix.}
20 |
21 | \item{consensus_by}{A string with the column from colData that will be used
22 | to isolate the cells by factor and calculate the consensus.}
23 |
24 | \item{fun}{A string indicating the summarizing function to be used.}
25 |
26 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
27 | should be parallelized.}
28 | }
29 | \value{
30 | A consensus matrix stored in the consensus slot of the CopyKit object
31 | }
32 | \description{
33 | Calculate a consensus matrix of segment means based on \code{colData}
34 | }
35 | \details{
36 | Consensus profiles are calculated by averaging or taking the median
37 | of the ith segment mean of all single cells assigned to the same element of
38 | \link{colData},
39 | }
40 | \examples{
41 | copykit_obj <- copykit_example_filtered()
42 | copykit_obj <- findClusters(copykit_obj)
43 | copykit_obj <- calcConsensus(copykit_obj)
44 | }
45 |
--------------------------------------------------------------------------------
/man/calcInteger.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/calcInteger.R
3 | \name{calcInteger}
4 | \alias{calcInteger}
5 | \title{calcInteger()}
6 | \usage{
7 | calcInteger(
8 | scCNA,
9 | assay = c("bincounts", "smoothed_bincounts", "segment_ratios"),
10 | method = "fixed",
11 | ploidy_value = NULL,
12 | name = "integer",
13 | penalty = 25,
14 | BPPARAM = bpparam()
15 | )
16 | }
17 | \arguments{
18 | \item{scCNA}{The CopyKit object.}
19 |
20 | \item{assay}{String with the name of the assay to pull data from to calculate
21 | integers.}
22 |
23 | \item{method}{Method used to scale the ratio values to integer.}
24 |
25 | \item{ploidy_value}{If method of choice is 'fixed' a ploidy value should be
26 | provided.}
27 |
28 | \item{name}{String specifying the name to be used to store the result in the
29 | reducedDims of the output.}
30 |
31 | \item{penalty}{An integer passed on to scquantum::ploidy.inference()
32 | penalty argument}
33 |
34 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
35 | should be parallelized.}
36 | }
37 | \value{
38 | The CopyKit object with an assay slot named 'integer' that contains
39 | a data frame with cells as columns and integerized segments as rows. And, in
40 | case of method = 'scquantum' CopyKit adds three new elements to \code{colData}
41 | named 'ploidy' and 'ploidy_score' and the 'confidence ratio' obtained from
42 | scquantum for each cell.
43 | }
44 | \description{
45 | Calculates the integer copy number profile for each single cell
46 | }
47 | \details{
48 | CopyKit support the following methods for calculating integer copy number
49 | matrices
50 | \itemize{
51 | \item{fixed:} When method argument is set to 'fixed' copykit extracts the
52 | segment means from the scCNA object and multiplies those means by the value
53 | provided in the argument ploidy_value.
54 |
55 |
56 | \item{scquantum:} When the method argument is set to 'scquantum', CopyKit
57 | applies \code{\link[scquantum]{ploidy.inference}} function to perform a
58 | sample wise calculation returning the estimated compuational ploidy for
59 | every single cell
60 | }
61 | }
62 | \examples{
63 | copykit_obj <- mock_bincounts(ncells_diploid = 0, ncells = 10)
64 | copykit_obj <- calcInteger(copykit_obj, method = "scquantum")
65 | }
66 |
--------------------------------------------------------------------------------
/man/calcRatios.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/calcRatios.R
3 | \name{calcRatios}
4 | \alias{calcRatios}
5 | \title{Calculates the ratios from a matrix of counts}
6 | \usage{
7 | calcRatios(
8 | scCNA,
9 | assay = c("ft", "bincounts", "smoothed_bincounts"),
10 | fun = c("mean", "median")
11 | )
12 | }
13 | \arguments{
14 | \item{scCNA}{The scCNA object}
15 |
16 | \item{assay}{String with the name of the assay to pull data from to calculate
17 | the ratios.}
18 |
19 | \item{fun}{A string indicating the summarizing function to be used.}
20 | }
21 | \value{
22 | A ratio matrix within the slot assay(scCNA, 'ratios')
23 | can be accessed with \code{ratios}.
24 | }
25 | \description{
26 | Calculates the ratios from a matrix of counts
27 | }
28 | \details{
29 | Calculates a sample-wise normalization of the selected assay by the
30 | mean bin counts returns ratios where a value of 1 corresponds to the neutral
31 | copy number state of the sample
32 | }
33 | \examples{
34 | copykit_obj <- mock_bincounts()
35 | copykit_obj <- calcRatios(copykit_obj)
36 | }
37 |
--------------------------------------------------------------------------------
/man/data.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/data.R, R/internals.R
3 | \docType{data}
4 | \name{hg38_grangeslist}
5 | \alias{hg38_grangeslist}
6 | \alias{hg19_rg}
7 | \alias{copykit_obj_rle}
8 | \alias{copykit_obj_filt_rle}
9 | \alias{copykit_obj_filt_umap}
10 | \alias{hg19_genes}
11 | \alias{hg38_genes}
12 | \alias{copykit_example}
13 | \alias{copykit_example_filtered}
14 | \alias{mock_bincounts}
15 | \title{hg38_grangeslist}
16 | \format{
17 | An object of class \code{CompressedGRangesList} of length 8.
18 |
19 | An object of class \code{CompressedGRangesList} of length 8.
20 |
21 | An object of class \code{list} of length 790.
22 |
23 | An object of class \code{list} of length 1502.
24 |
25 | An object of class \code{matrix} (inherits from \code{array}) with 790 rows and 2 columns.
26 |
27 | An object of class \code{GRanges} of length 23056.
28 |
29 | An object of class \code{GRanges} of length 30909.
30 | }
31 | \source{
32 | library(TxDb.Hsapiens.UCSC.hg19.knownGene)
33 |
34 | library(TxDb.Hsapiens.UCSC.hg38.knownGene)
35 | }
36 | \usage{
37 | hg38_grangeslist
38 |
39 | hg38_grangeslist
40 |
41 | copykit_obj_filt_rle
42 |
43 | copykit_obj_rle
44 |
45 | copykit_obj_filt_umap
46 |
47 | hg19_genes
48 |
49 | hg38_genes
50 |
51 | copykit_example()
52 |
53 | copykit_example_filtered()
54 |
55 | mock_bincounts(
56 | ncells = 30,
57 | ncells_diploid = 5,
58 | position_gain = 4900:5493,
59 | position_del = 6523:7056,
60 | genome = "hg38",
61 | resolution = "220kb",
62 | run_vst = TRUE,
63 | run_segmentation = TRUE,
64 | run_lognorm = TRUE
65 | )
66 | }
67 | \arguments{
68 | \item{ncells}{A numeric with the total number of cells to simulate.}
69 |
70 | \item{ncells_diploid}{A numeric with the number of diploid cells to simulate}
71 |
72 | \item{position_gain}{A vector with the index of the bin counts in which
73 | chromosomal gains will be added.}
74 |
75 | \item{position_del}{A vector with the index of the bin counts in which
76 | chromosomal deletions will be placed.}
77 |
78 | \item{genome}{The assembly genome information to add to the metadata.}
79 |
80 | \item{resolution}{The resolution of the scaffold to add to the object
81 | metadata}
82 | }
83 | \value{
84 | Contains a GrangesList object with the scaffolds for each of the
85 | resolutions used by runVarbin, runCountReads and runSegmentation on the
86 | hg38 genome assembly.
87 |
88 | Contains a GrangesList object with the scaffolds for each of the
89 | resolutions used by runVarbin, runCountReads and runSegmentation on the hg19
90 | genome assembly.
91 |
92 | A CopyKit object with data from BL1 sample from the CopyKit
93 | manuscript.
94 |
95 | A CopyKit object with data from BL1 sample from the CopyKit
96 | manuscript with diploid and noise cells removed.
97 |
98 | A CopyKit object with simulated bincounts
99 | }
100 | \description{
101 | hg38_grangeslist
102 |
103 | hg19_rg
104 |
105 | copykit_obj_rle
106 |
107 | copykit_obj_filt_rle
108 |
109 | copykit_obj_filt_umap
110 |
111 | hg19_genes
112 |
113 | hg38_genes
114 |
115 | CopyKit Example
116 |
117 | CopyKit Example
118 |
119 | mock_bincounts
120 | }
121 | \details{
122 | Contains a Rle object with the segment ratios values of the copykit
123 | BL1 example dataset. It is used by the functions copykit_example
124 |
125 | Contains a Rle object with the segment ratios values of the copykit
126 | BL1 example filtered dataset. It is used by the functions
127 | copykit_example_filtered()
128 |
129 | Contains the umap reduced dimension for the BL1 dataset as generated
130 | for the CopyKit manuscript
131 |
132 | Contains the GrangesObject for the genomic positions of genes in the
133 | hg19 genome assembly
134 |
135 | Contains the GrangesObject for the genomic positions of genes in the
136 | hg38 genome assembly
137 |
138 | This function is largely used for examples of CopyKit functions.
139 |
140 | This function returns a CopyKit object with the unfiltered dataset
141 | of the sample BL1. This sample was processed with ACT and is a liver
142 | metastasis from a primary breast cancer patient.
143 |
144 | The CopyKit object contain only the segment ratio mean of each single cell
145 | and, therefore, is not compatible with the functions from the runVarbin
146 | module.
147 |
148 | This function is largely used for examples of CopyKit functions.
149 |
150 | This function returns a CopyKit object with the unfiltered dataset
151 | of the sample BL1. This sample was processed with ACT and is a liver
152 | metastasis from a primary breast cancer patient.
153 |
154 | The CopyKit object contain only the segment ratio mean of each single cell
155 | and, therefore, is not compatible with the functions from the runVarbin
156 | module.
157 | }
158 | \keyword{internal}
159 |
--------------------------------------------------------------------------------
/man/dot-countBreakpoints.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/countBreakpoints.R
3 | \name{.countBreakpoints}
4 | \alias{.countBreakpoints}
5 | \title{countBreakpoints}
6 | \usage{
7 | .countBreakpoints(scCNA)
8 | }
9 | \arguments{
10 | \item{scCNA}{}
11 | }
12 | \value{
13 | The scCNA object with a column of breakpoint counts added to colData.
14 | }
15 | \description{
16 | Considers changes in the segment ratios as breakpoints.
17 | Counts the breakpoints for each chromosome arm separately.
18 | }
19 | \examples{
20 | copykit_obj <- copykit_example_filtered()
21 | copykit_obj <- .countBreakpoints(copykit_obj)
22 | }
23 | \keyword{internal}
24 |
--------------------------------------------------------------------------------
/man/findAneuploidCells.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/findAneuploidCells.R
3 | \name{findAneuploidCells}
4 | \alias{findAneuploidCells}
5 | \title{findAneuploidCells}
6 | \usage{
7 | findAneuploidCells(
8 | scCNA,
9 | assay = "segment_ratios",
10 | resolution = "auto",
11 | remove_XY = TRUE,
12 | simul = TRUE,
13 | seed = 17
14 | )
15 | }
16 | \arguments{
17 | \item{scCNA}{The CopyKit object}
18 |
19 | \item{assay}{String with the name of the assay to pull data from to find
20 | normal cells.}
21 |
22 | \item{resolution}{A numeric scalar used as threshold to detect normal cells.}
23 |
24 | \item{remove_XY}{A boolean that removes chrX and chrY from the analysis.}
25 |
26 | \item{simul}{A boolean that if TRUE adds a simulated normal dataset to boost
27 | identifying normal cells in datasets with small proportions of normal cells.}
28 |
29 | \item{seed}{Seed passed on to reproduce simulated CV of normal cells.}
30 | }
31 | \value{
32 | information is added to \code{\link[SummarizedExperiment]{colData}}
33 | in a columns named 'is_aneuploid' being TRUE if a cell is detected as
34 | aneuploid and FALSE if the cell is detected as euploid.
35 | }
36 | \description{
37 | Find cells that are not aneuploid in the dataset.
38 | }
39 | \details{
40 | performs a sample-wise calculation of the segment means coefficient
41 | of variation and fits a Gaussian mixture model to the observed distribution
42 | from all cells. To increase the sensitivity of the model, the expected
43 | distribution of the coefficient of variation for diploid cells is simulated
44 | for a thousand cells (mean = 0, sd = 0.01). This way, CopyKit can adequately
45 | detect diploid cells even in datasets with limited amounts of diploid cells
46 | and guarantees that no aneuploid cell will be removed from datasets without
47 | any diploid cells. The distribution with the smallest CV
48 | is assumed originate from normal cells. Cells are classified as diploid
49 | if they have a coefficient of variance smaller than the mean plus five times
50 | the standard deviation of the normal cell distribution.
51 | }
52 | \examples{
53 | set.seed(1000)
54 | copykit_obj <- copykit_example()[,sample(500)]
55 | copykit_obj <- findAneuploidCells(copykit_obj)
56 | }
57 |
--------------------------------------------------------------------------------
/man/findClusters.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/findClusters.R
3 | \name{findClusters}
4 | \alias{findClusters}
5 | \title{Find Clusters}
6 | \usage{
7 | findClusters(
8 | scCNA,
9 | embedding = "umap",
10 | ncomponents = 2,
11 | method = c("hdbscan", "leiden", "louvain"),
12 | k_superclones = NULL,
13 | k_subclones = NULL,
14 | seed = 17
15 | )
16 | }
17 | \arguments{
18 | \item{scCNA}{scCNA object.}
19 |
20 | \item{embedding}{String with the name of the reducedDim to pull data from.}
21 |
22 | \item{ncomponents}{An integer with the number of components dimensions to
23 | use from the embedding.}
24 |
25 | \item{method}{A string with method used for clustering.}
26 |
27 | \item{k_superclones}{A numeric k-nearest-neighbor value.
28 | Used to find the superclones.}
29 |
30 | \item{k_subclones}{A numeric k-nearest-neighbor value.
31 | Used to find the subclones}
32 |
33 | \item{seed}{A numeric passed on to pseudo-random dependent functions.}
34 | }
35 | \value{
36 | Cluster information is added to
37 | \code{\link[SummarizedExperiment]{colData}} in columns superclones or
38 | subclones. Superclones are prefixed by 's' whereas subclones are prefixed
39 | by 'c'.
40 | }
41 | \description{
42 | Search for clusters in the scCNA data.
43 | }
44 | \details{
45 | \code{findClusters} uses the reduced dimensional embedding resulting
46 | from \code{\link{runUmap}} to perform clustering at two levels, hereby
47 | referred to as superclones, and subclones. When clustering for superclones
48 | findClusters creates a graph representation of the dataset reduced
49 | dimension embedding using a shared nearest neighbor algorithm
50 | (SNN) \code{\link[bluster]{makeSNNGraph}}, from this graph the connected
51 | components are extracted and generally represent high-level structures
52 | that share large, lineage defining copy number events. At a more
53 | fine-grained resolution, CopyKit can also be used to detect subclones,
54 | i. e. groups of cells containing a unique copy number event per cluster,
55 | to do so the umap embedding is again used as the pre-processing step,
56 | this time to perform a density-based clustering with hdbscan
57 | \code{\link[dbscan]{hdbscan}}. Network clustering
58 | algorithms on top of the SNN graph such as the leiden algorithm
59 | \code{\link[leidenbase]{leiden_find_partition}}.
60 |
61 | \itemize{
62 | \item{hdbscan}: hdbscan is an outlier aware clustering algorithm, since
63 | extensive filtering of the dataset can be applied before clustering with
64 | \code{\link{findOutliers}}, any cell classified as an outlier is inferred
65 | to the same cluster group as its closest, non-outlier, nearest-neighbor
66 | according to Euclidean distance.
67 | }
68 | }
69 | \examples{
70 | copykit_obj <- copykit_example_filtered()
71 | copykit_obj <- findClusters(copykit_obj)
72 | }
73 | \references{
74 | Laks, E., McPherson, A., Zahn, H., et al. (2019). Clonal
75 | Decomposition and DNA Replication States Defined by Scaled Single-Cell
76 | Genome Sequencing. Cell, 179(5), 1207–1221.e22.
77 | https://doi.org/10.1016/j.cell.2019.10.026
78 |
79 | Leland McInnes and John Healy and James Melville. UMAP: Uniform Manifold
80 | Approximation and Projection for Dimension Reduction. arXiv:1802.03426
81 |
82 | Lun ATL, McCarthy DJ, Marioni JC (2016). “A step-by-step workflow for
83 | low-level analysis of single-cell RNA-seq data with Bioconductor.”
84 | F1000Res., 5, 2122. doi: 10.12688/f1000research.9501.2.
85 | }
86 | \seealso{
87 | \code{\link{findSuggestedK}}.
88 |
89 | \code{\link[dbscan]{hdbscan}} For hdbscan clustering.
90 | }
91 | \author{
92 | Darlan Conterno Minussi
93 | }
94 |
--------------------------------------------------------------------------------
/man/findOutliers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/findOutliers.R
3 | \name{findOutliers}
4 | \alias{findOutliers}
5 | \title{findOutliers()}
6 | \usage{
7 | findOutliers(
8 | scCNA,
9 | assay = "segment_ratios",
10 | k = 5,
11 | resolution = 0.9,
12 | BPPARAM = BiocParallel::bpparam()
13 | )
14 | }
15 | \arguments{
16 | \item{scCNA}{CopyKit object.}
17 |
18 | \item{assay}{String with the name of the assay to pull data.}
19 |
20 | \item{k}{A numeric scalar with the number k-nearest-neighbor cells to
21 | calculate the mean correlation}
22 |
23 | \item{resolution}{A numeric scalar that set's how strict the
24 | correlation cut off will be.}
25 |
26 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
27 | should be parallelized.}
28 | }
29 | \value{
30 | Adds a column 'outlier' to
31 | \code{\link[SummarizedExperiment]{colData}}. Cells that pass the filtering
32 | criteria receive the label "kept", whereas cells that do not pass the
33 | filtering criteria receive the label "removed".
34 | }
35 | \description{
36 | Uses a nearest neighbor approach to find noise copy number profiles within
37 | the segment means.
38 | }
39 | \details{
40 | \code{findOutliers} To detect low-quality cells, CopyKit calculates
41 | the Pearson correlation matrix of all samples from the segment ratio means.
42 | Next, we calculate a sample-wise mean of the correlation between a sample
43 | and its k-nearest-neighbors. Samples in which the correlation value is lower
44 | than the defined threshold are classified as low-quality cells.
45 | }
46 | \examples{
47 | set.seed(1000)
48 | copykit_obj <- copykit_example()[,sample(500)]
49 | copykit_obj <- findAneuploidCells(copykit_obj)
50 | copykit_obj <- copykit_obj[, colData(copykit_obj)$is_aneuploid == TRUE]
51 | copykit_obj <- findOutliers(copykit_obj)
52 | }
53 | \author{
54 | Hua-Jun Wu
55 |
56 | Darlan Conterno Minussi
57 |
58 | Junke Wang
59 | }
60 |
--------------------------------------------------------------------------------
/man/findSuggestedK.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/findSuggestedK.R
3 | \name{findSuggestedK}
4 | \alias{findSuggestedK}
5 | \alias{hdbscanCBI}
6 | \alias{leidenCBI}
7 | \alias{louvainCBI}
8 | \title{findSuggestedK}
9 | \usage{
10 | findSuggestedK(
11 | scCNA,
12 | embedding = "umap",
13 | ncomponents = 2,
14 | k_range = NULL,
15 | method = c("hdbscan", "leiden", "louvain"),
16 | metric = c("median", "mean"),
17 | seed = 17,
18 | B = 200,
19 | BPPARAM = bpparam()
20 | )
21 |
22 | hdbscanCBI(data, minPts, diss = inherits(data, "dist"), ...)
23 |
24 | leidenCBI(data, k, seed_leid, diss = inherits(data, "dist"), ...)
25 |
26 | louvainCBI(data, k, seed_leid, diss = inherits(data, "dist"), ...)
27 | }
28 | \arguments{
29 | \item{scCNA}{The CopyKit object.}
30 |
31 | \item{embedding}{String with the name of the reducedDim embedding.}
32 |
33 | \item{ncomponents}{An integer with the number of components dimensions to
34 | use from the embedding.}
35 |
36 | \item{k_range}{A numeric range of values to be tested.}
37 |
38 | \item{method}{A string with the method of clustering to be tested.}
39 |
40 | \item{metric}{A string with the function to summarize the jaccard similarity
41 | value from all clusters.}
42 |
43 | \item{seed}{A numerical scalar with a seed value to be passed on to
44 | \code{\link[uwot]{umap}}.}
45 |
46 | \item{B}{A numeric with the number of bootstrapping iterations passed on to
47 | \code{\link[fpc]{clusterboot}}. Higher values yield better results at a cost
48 | of performance}
49 |
50 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
51 | should be parallelized.}
52 | }
53 | \value{
54 | Adds a table with the mean jaccard coefficient of clusters for each
55 | tested k and the suggested k value to be used for clustering to
56 | \code{\link[S4Vectors]{metadata}}
57 | }
58 | \description{
59 | Performs a grid search over a range of k values to assess cluster stability.
60 | }
61 | \details{
62 | Performs a grid-search over a range of k values and returns the value
63 | that maximizes the jaccard similarity. Importantly, while this approach does
64 | not guarantee optimal clustering, it provides a guide that maximizes cluster
65 | stability.
66 |
67 | The default tested range is from 7 to the square root of the number of cells
68 | in the scCNA object. If sqrt(n_cells) is smaller than 7 a range of 5 to 15
69 | is tested.
70 | }
71 | \examples{
72 | set.seed(1000)
73 | copykit_obj <- copykit_example_filtered()[,sample(300)]
74 | copykit_obj <- findSuggestedK(copykit_obj)
75 | }
76 | \references{
77 | Hennig, C. (2007) Cluster-wise assessment of cluster stability.
78 | Computational Statistics and Data Analysis, 52, 258-271.
79 |
80 | Hennig, C. (2008) Dissolution point and isolation robustness: robustness
81 | criteria for general cluster analysis methods.
82 | Journal of Multivariate Analysis 99, 1154-1176.
83 | }
84 | \seealso{
85 | \code{\link[fpc]{clusterboot}}
86 |
87 | \code{\link{plotSuggestedK}}
88 | }
89 | \keyword{internal}
90 |
--------------------------------------------------------------------------------
/man/findVariableGenes.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/findVariableGenes.R
3 | \name{findVariableGenes}
4 | \alias{findVariableGenes}
5 | \title{findVariableGenes}
6 | \usage{
7 | findVariableGenes(scCNA, genes, assay = "logr", top_n = 50)
8 | }
9 | \arguments{
10 | \item{scCNA}{scCNA object.}
11 |
12 | \item{genes}{A vector of strings containing the HUGO Symbol for the gene
13 | of interest.}
14 |
15 | \item{assay}{String with the name of the assay to pull data with the copy
16 | number states for each gene.}
17 |
18 | \item{top_n}{A numeric defining how many variable genes will be returned.}
19 | }
20 | \value{
21 | A string vector with the HUGO genes in decreasing order of importance
22 | stored to the \code{\link[S4Vectors]{metadata}}.
23 | }
24 | \description{
25 | Find the most variable genes in the dataset.
26 | }
27 | \details{
28 | \code{findVariableGenes} Runs \code{\link[stats]{prcomp}} to the
29 | copy number states of the genes from the provided gene list and returns
30 | the one that have the largest absolute variance as assesed by the
31 | loadings of the first principal component.
32 |
33 | The resulting list of genes is stored within the metadata of the scCNA
34 | object and can be accessed with \code{\link[S4Vectors]{metadata}}.
35 | }
36 | \examples{
37 | copykit_obj <- copykit_example_filtered()
38 | copykit_obj <- findVariableGenes(copykit_obj,
39 | genes = c("FHIT", "PTEN", "FOXO1", "BRCA1")
40 | )
41 | }
42 |
--------------------------------------------------------------------------------
/man/inferMrca.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/inferMrca.R
3 | \name{inferMrca}
4 | \alias{inferMrca}
5 | \title{inferMrca}
6 | \usage{
7 | inferMrca(scCNA, value = 1)
8 | }
9 | \arguments{
10 | \item{scCNA}{the scCNA object}
11 |
12 | \item{value}{A numeric value used to compare the profiles to infer the mrca,
13 | usually equal to the mean segment ratio of cells (value = 1) or the average
14 | copy number of the cells}
15 | }
16 | \value{
17 | Returns a numeric vector added to the \code{\link[S4Vectors]{metadata}}
18 | of the scCNA object named `inferred_mrca`
19 | }
20 | \description{
21 | From the consensus matrix it infers a Most Recent Common Ancestral (MRCA)
22 | across all groups.
23 | }
24 | \details{
25 | Calculates the MRCA by inferring, for every bin, the value across
26 | all groups that is closest to the number supplied in the argument value.
27 | }
28 | \examples{
29 | copykit_obj <- copykit_example_filtered()[,1:300]
30 | copykit_obj <- findClusters(copykit_obj)
31 | copykit_obj <- calcConsensus(copykit_obj)
32 | copykit_obj <- inferMrca(copykit_obj)
33 | }
34 |
--------------------------------------------------------------------------------
/man/internals.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/internals.R
3 | \docType{methods}
4 | \name{CopyKit-internals}
5 | \alias{CopyKit-internals}
6 | \alias{segment_ratios}
7 | \alias{segment_ratios,CopyKit-method}
8 | \alias{ratios}
9 | \alias{ratios,CopyKit-method}
10 | \alias{bincounts}
11 | \alias{bincounts,CopyKit-method}
12 | \alias{consensus}
13 | \alias{consensus,CopyKit-method}
14 | \alias{consensus<-}
15 | \alias{consensus<-,CopyKit-method}
16 | \alias{phylo}
17 | \alias{phylo,CopyKit-method}
18 | \alias{phylo<-}
19 | \alias{phylo<-,CopyKit-method}
20 | \alias{consensusPhylo}
21 | \alias{consensusPhylo,CopyKit-method}
22 | \alias{consensusPhylo<-}
23 | \alias{consensusPhylo<-,CopyKit-method}
24 | \alias{distMat}
25 | \alias{distMat,CopyKit-method}
26 | \alias{distMat<-}
27 | \alias{distMat<-,CopyKit-method}
28 | \alias{graph}
29 | \alias{graph,CopyKit-method}
30 | \alias{graph<-}
31 | \alias{graph<-,CopyKit-method}
32 | \alias{show}
33 | \alias{show,CopyKit-method}
34 | \alias{\%!in\%}
35 | \alias{ocean_balance_hex}
36 | \alias{ocean.balance}
37 | \alias{superclones_pal}
38 | \alias{subclones_pal}
39 | \alias{find_scaffold_genes}
40 | \alias{l2e.normal.sd}
41 | \alias{overdispersion}
42 | \alias{parCor}
43 | \alias{mergeLevels}
44 | \alias{combine.func}
45 | \title{CopyKit internal functions.}
46 | \format{
47 | An object of class \code{character} of length 29.
48 | }
49 | \usage{
50 | \S4method{segment_ratios}{CopyKit}(x, withDimnames = TRUE)
51 |
52 | \S4method{ratios}{CopyKit}(x, withDimnames = TRUE)
53 |
54 | \S4method{bincounts}{CopyKit}(x, withDimnames = TRUE)
55 |
56 | \S4method{consensus}{CopyKit}(x, withDimnames = TRUE)
57 |
58 | \S4method{consensus}{CopyKit}(x) <- value
59 |
60 | \S4method{phylo}{CopyKit}(x)
61 |
62 | \S4method{phylo}{CopyKit}(x) <- value
63 |
64 | \S4method{consensusPhylo}{CopyKit}(x)
65 |
66 | \S4method{consensusPhylo}{CopyKit}(x) <- value
67 |
68 | \S4method{distMat}{CopyKit}(x)
69 |
70 | \S4method{distMat}{CopyKit}(x) <- value
71 |
72 | \S4method{graph}{CopyKit}(x)
73 |
74 | \S4method{graph}{CopyKit}(x) <- value
75 |
76 | \S4method{show}{CopyKit}(object)
77 |
78 | x \%!in\% table
79 |
80 | ocean_balance_hex
81 |
82 | ocean.balance(n)
83 |
84 | superclones_pal()
85 |
86 | subclones_pal()
87 |
88 | find_scaffold_genes(scCNA, genes)
89 |
90 | l2e.normal.sd(xs)
91 |
92 | overdispersion(v)
93 |
94 | parCor(x, BPPARAM = BiocParallel::bpparam())
95 |
96 | mergeLevels(
97 | vecObs,
98 | vecPred,
99 | pv.thres = 1e-04,
100 | ansari.sign = 0.05,
101 | thresMin = 0.05,
102 | thresMax = 0.5,
103 | verbose = 1,
104 | scale = TRUE
105 | )
106 |
107 | combine.func(
108 | diff,
109 | vecObs,
110 | vecPredNow,
111 | mnNow,
112 | mn1,
113 | mn2,
114 | pv.thres = 1e-04,
115 | thresAbs = 0
116 | )
117 | }
118 | \arguments{
119 | \item{x}{CopyKit object.}
120 | }
121 | \value{
122 | Hexadecimal values for ocean.balance function
123 |
124 | The default colors for heatmaps
125 |
126 | a named vector of default colors for CopyKit superclones.
127 |
128 | a named vector of default colors for CopyKit subclones.
129 |
130 | A data frame with the gene HUGO gene symbol and the position on the
131 | relevant scaffold from the varbin pipeline.
132 |
133 | A numeric vector with least squares sd estimation.
134 |
135 | A numerci vector with the estimation of the index of dispersion,
136 | which is used when estimating standard errors for each segment mean
137 |
138 | A matrix with the pairwise correlation from the segment ratio means.
139 | }
140 | \description{
141 | This document establish setters and getters to facilitate access
142 | to fields for the CopyKit class object. The functions provided here are
143 | in addition to setters and getters available from the SingleCellExperiment
144 | class
145 | }
146 | \section{Getters}{
147 |
148 | \describe{
149 | \item{\code{segment_ratios}:}{Returns a data frame of normalized segment
150 | ratio means.}
151 | \item{\code{ratios}:}{Returns a data frame of normalized ratio means.}
152 | \item{\code{bincounts}:}{Returns a data frame of binned bincounts.}
153 | \item{\code{consensus}:}{Returns a data frame of normalized segment
154 | ratio means for the consensus matrix.}
155 | \item{\code{phylo}:}{Returns a phylo class object with a phylogenetic tree.}
156 | \item{\code{consensusPhylo}:}{Returns a phylo class object with a
157 | phylogenetic tree from the consensus matrix.}
158 | }
159 | }
160 |
161 | \author{
162 | Alexander Davis
163 |
164 | Junke Wang
165 | }
166 | \keyword{datasets}
167 | \keyword{internal}
168 |
--------------------------------------------------------------------------------
/man/knnSmooth.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/knnSmooth.R
3 | \name{knnSmooth}
4 | \alias{knnSmooth}
5 | \title{knnSmooth}
6 | \usage{
7 | knnSmooth(scCNA, k = 4, BPPARAM = bpparam())
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{k}{A numeric with the k nearest neighbor value for smoothing}
13 |
14 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
15 | should be parallelized.}
16 | }
17 | \value{
18 | The CopyKit object with an assay smoothed_bincounts
19 | }
20 | \description{
21 | Smooth bincounts based on k nearest neighbors.
22 | }
23 | \details{
24 | This function uses a k-nearest neighbors approach to smooth cells
25 | raw bincounts. To do so, the k-nearest neighbors are calculated with
26 | \code{\link[BiocNeighbors]{findKNN}}. The bincounts of the k-nearest neighbors
27 | for each cell are tallied and an assay called smoothed_bincounts is added to
28 | \code{\link{assay}}. After, \code{\link{runVst}} and
29 | \code{\link{runSegmentation}}. Are re-run by \code{knnSmooth}.
30 |
31 | This function results in a trade-off for the elimination of noise at the cost
32 | of risk of loss of subclonal structure. To minimize the risk of subclonal
33 | structure loss we recommend using the very small values of k.
34 |
35 | This function should be followed by applying \code{\link{runVst}} and
36 | \code{\link{runSegmentation}} to the CopyKit object.
37 | }
38 | \examples{
39 | copykit_obj <- mock_bincounts(ncells = 10)
40 | copykit_obj <- runSegmentation(copykit_obj)
41 | copykit_obj <- knnSmooth(copykit_obj)
42 |
43 |
44 | }
45 | \author{
46 | Darlan Conterno Minussi
47 |
48 | Runmin Wei
49 | }
50 |
--------------------------------------------------------------------------------
/man/logNorm.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/logNorm.R
3 | \name{logNorm}
4 | \alias{logNorm}
5 | \title{logNorm()}
6 | \usage{
7 | logNorm(
8 | scCNA,
9 | transform = c("log", "log2", "log10", "log1p"),
10 | assay = "segment_ratios",
11 | name = "logr"
12 | )
13 | }
14 | \arguments{
15 | \item{scCNA}{scCNA object.}
16 |
17 | \item{transform}{String specifying the transformation to apply to the selected
18 | assay.}
19 |
20 | \item{assay}{String with the name of the assay to pull data from to run the
21 | segmentation.}
22 |
23 | \item{name}{String with the name for the target slot for the resulting
24 | transformed counts.}
25 | }
26 | \value{
27 | A data frame with log transformed counts inside the
28 | \code{\link[SummarizedExperiment]{assay}} slot.
29 | }
30 | \description{
31 | Computes a log transformation of the selected assay
32 | }
33 | \examples{
34 | copykit_obj <- copykit_example()
35 | copykit_obj <- logNorm(copykit_obj)
36 | }
37 |
--------------------------------------------------------------------------------
/man/pipe.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils-pipe.R
3 | \name{\%>\%}
4 | \alias{\%>\%}
5 | \title{Pipe operator}
6 | \usage{
7 | lhs \%>\% rhs
8 | }
9 | \value{
10 | pipe
11 | }
12 | \description{
13 | See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
14 | }
15 | \examples{
16 | iris \%>\% head()
17 | }
18 | \keyword{internal}
19 |
--------------------------------------------------------------------------------
/man/plotAlluvial.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotAlluvial.R
3 | \name{plotAlluvial}
4 | \alias{plotAlluvial}
5 | \title{plotAlluvial()}
6 | \usage{
7 | plotAlluvial(scCNA, label, label_colors = NULL, min_cells = NULL)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{label}{A string with two or more elements from \code{\link[SummarizedExperiment]{colData}}.}
13 |
14 | \item{label_colors}{An optional named vector with the colors of each element
15 | from label.}
16 |
17 | \item{min_cells}{An optional numeric to filter stratum that do not reach
18 | the minimum amount of cells.}
19 | }
20 | \value{
21 | A ggplot object containing an alluvial plot from ggalluvial
22 | }
23 | \description{
24 | Produces an alluvial plot from character elements of the metadata
25 | }
26 | \examples{
27 | copykit_obj <- copykit_example_filtered()
28 | copykit_obj <- findClusters(copykit_obj)
29 | colData(copykit_obj)$section <- stringr::str_extract(
30 | colData(copykit_obj)$sample,
31 | "(L[0-9]+L[0-9]+|L[0-9]+)"
32 | )
33 | plotAlluvial(copykit_obj, label = c("subclones", "section"))
34 | }
35 |
--------------------------------------------------------------------------------
/man/plotConsensusLine.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotConsensusLine.R
3 | \name{plotConsensusLine}
4 | \alias{plotConsensusLine}
5 | \title{plotConsensusLine}
6 | \usage{
7 | plotConsensusLine(scCNA)
8 | }
9 | \arguments{
10 | \item{scCNA}{The scCNA object}
11 | }
12 | \value{
13 | An interactive plot where different groups
14 | can be selected for easier visualization
15 | }
16 | \description{
17 | Opens an interactive app showing ratio line plots of the different consensus
18 | groups
19 | }
20 | \examples{
21 | \dontrun{
22 | copykit_obj <- copykit_example_filtered()
23 | copykit_obj <- findClusters(copykit_obj)
24 | copykit_obj <- calcConsensus(copykit_obj)
25 | plotConsensusLine(copykit_obj)
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/man/plotFreq.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotFreq.R
3 | \name{plotFreq}
4 | \alias{plotFreq}
5 | \title{plotFreq}
6 | \usage{
7 | plotFreq(
8 | scCNA,
9 | high_threshold = 1.1,
10 | low_threshold = 0.9,
11 | assay = "segment_ratios",
12 | group = NULL,
13 | geom = c("area", "line"),
14 | BPPARAM = bpparam()
15 | )
16 | }
17 | \arguments{
18 | \item{scCNA}{scCNA object.}
19 |
20 | \item{high_threshold}{A numeric with the threshold above which events are
21 | considered amplifications.}
22 |
23 | \item{low_threshold}{A numeric with the threshold below which events are
24 | considered deletions.}
25 |
26 | \item{assay}{String with the name of the assay to pull data from to plot
27 | the frequency plot.}
28 |
29 | \item{group}{A string with the name of the columns from
30 | \code{\link[SummarizedExperiment]{colData}} to separate each frequency plot.}
31 |
32 | \item{geom}{A character with the desired geom}
33 |
34 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
35 | should be parallelized.}
36 | }
37 | \value{
38 | A ggplot object with a frequency plot
39 | }
40 | \description{
41 | plotFreq
42 | }
43 | \details{
44 | \code{plotFreq} retrieves the data from the desired assay and creates
45 | an event matrix based on the high and low thresholds arguments. Values above
46 | the high threshold will be classified as gains whereas values below are
47 | classified as deletions. The resulting plot is a frequency plot where values
48 | above 0 represent the frequency of gains and values below 0 represent the
49 | frequency of deletions.
50 |
51 | If the argument 'group' is provided the frequency plot will be calculated
52 | separately for each group. Group can be any string column from
53 | \code{\link[SummarizedExperiment]{colData}}
54 |
55 | The following geoms are available:
56 |
57 | \itemize{
58 | \item{area}: If geom = 'area' an area plot with the frequency is plotted.
59 | If the group argument is provided a different facet will be plotted for each
60 | group
61 |
62 | \item{line}: If geom = 'line' a line plot with the frequency is plotted.
63 | If the group argument lines are overlapped with different colors.
64 |
65 | }
66 | }
67 | \examples{
68 | set.seed(1000)
69 | copykit_obj <- copykit_example_filtered()[, sample(40)]
70 | plotFreq(copykit_obj)
71 | }
72 |
--------------------------------------------------------------------------------
/man/plotGeneCopy.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotGeneCopy.R
3 | \name{plotGeneCopy}
4 | \alias{plotGeneCopy}
5 | \title{plotGeneCopy}
6 | \usage{
7 | plotGeneCopy(
8 | scCNA,
9 | genes,
10 | geom = c("swarm", "barplot", "violin"),
11 | label = NULL,
12 | facet = NULL,
13 | dodge.width = 0,
14 | assay = "segment_ratios"
15 | )
16 | }
17 | \arguments{
18 | \item{scCNA}{scCNA object.}
19 |
20 | \item{genes}{A vector of strings containing the HUGO Symbol for the gene
21 | of interest.}
22 |
23 | \item{geom}{A string with the geom for plotting.}
24 |
25 | \item{label}{A string with the name of the column from
26 | \code{\link[SummarizedExperiment]{colData}} to color the points}
27 |
28 | \item{facet}{A string with the name of the column from
29 | \code{\link[SummarizedExperiment]{colData}} to separate the plot into facets.}
30 |
31 | \item{dodge.width}{A numeric that adds dodge between the label categories.}
32 |
33 | \item{assay}{String with the name of the assay for plotting.}
34 | }
35 | \value{
36 | A ggplot object with a plot of the gene-wise copy number states.
37 | }
38 | \description{
39 | Visualization for gene-wise copy number states
40 | }
41 | \details{
42 | plotGeneCopy finds overlaps of the varbin scaffolds genomic ranges
43 | which can be accessed with \code{\link[SummarizedExperiment]{rowRanges}}
44 | with the genes from the assemblies of either hg19 or hg38. The genomic ranges
45 | from hg19 comes from package \code{TxDb.Hsapiens.UCSC.hg19.knownGene} whereas
46 | for hg38 package \code{TxDb.Hsapiens.UCSC.hg38.knownGene}.
47 |
48 | If the argument geom is set to 'barplot' plotGeneCopy calculates gene-wise
49 | frequencies of each copy number state for the selected genes across all of
50 | the cells. Geom 'barplot' can only be used with the argument
51 | assay set to 'integer'.
52 | }
53 | \examples{
54 | copykit_obj <- copykit_example_filtered()
55 | copykit_obj <- findClusters(copykit_obj)
56 | plotGeneCopy(copykit_obj, genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"))
57 | plotGeneCopy(copykit_obj,
58 | genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"),
59 | label = "subclones"
60 | )
61 | plotGeneCopy(copykit_obj,
62 | genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"),
63 | label = "subclones", dodge.width = 0.8
64 | )
65 | }
66 | \author{
67 | Darlan Conterno Minussi
68 | }
69 |
--------------------------------------------------------------------------------
/man/plotHeatmap.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotHeatmap.R
3 | \name{plotHeatmap}
4 | \alias{plotHeatmap}
5 | \title{plotHeatmap}
6 | \usage{
7 | plotHeatmap(
8 | scCNA,
9 | assay = "segment_ratios",
10 | order_cells = NULL,
11 | label = NULL,
12 | label_colors = NULL,
13 | group = NULL,
14 | consensus = FALSE,
15 | rounding_error = FALSE,
16 | genes = NULL,
17 | col = NULL,
18 | row_split = NULL,
19 | use_raster = TRUE,
20 | raster_quality = 2,
21 | n_threads = 1
22 | )
23 | }
24 | \arguments{
25 | \item{scCNA}{The CopyKit object.}
26 |
27 | \item{assay}{String with the assay to pull data from to plot heatmap.}
28 |
29 | \item{order_cells}{A string with the desired method to order the cells within}
30 |
31 | \item{label}{A vector with the string names of the columns from
32 | \code{\link[SummarizedExperiment]{colData}} for heatmap annotation.}
33 |
34 | \item{label_colors}{A named list with colors for the label annotation.
35 | Must match label length and have the same names as label}
36 |
37 | \item{group}{with the names of the columns from
38 | \code{\link[SummarizedExperiment]{colData}} to add a barplot with frequency
39 | of the groups to a consensus heatmap.}
40 |
41 | \item{consensus}{A boolean indicating if the consensus heatmap should be
42 | plotted.}
43 |
44 | \item{rounding_error}{A boolean indicating if the rounding error matrix
45 | should be plotted.}
46 |
47 | \item{genes}{A character vector with the HUGO symbol for genes to annotate
48 | on the heatmap.}
49 |
50 | \item{col}{A colorRamp2 vector that controls the color scale of the heatmap.
51 | See \code{\link[ComplexHeatmap]{Heatmap}} or ComplexHeatmap online docs for
52 | help.}
53 |
54 | \item{row_split}{A string with the names of the columns from
55 | \code{\link[SummarizedExperiment]{colData}} to split the heatmap.}
56 |
57 | \item{use_raster}{Whether render the heatmap body as a raster image.
58 | It helps to reduce file size when the matrix is huge. If number of rows or
59 | columns is more than 2000, it is by default turned on. Note if cell_fun is
60 | set, use_raster is enforced to be FALSE.
61 | see \code{\link[ComplexHeatmap]{Heatmap}}.}
62 |
63 | \item{raster_quality}{A value larger than 1. Larger values increase the
64 | file size.}
65 |
66 | \item{n_threads}{Number of threads passed on to \code{runDistMat}.}
67 | }
68 | \value{
69 | A \code{ComplexHeatmap} object with a heatmap of copy number data
70 | where the columns are the genomic positions and each row is a cell.
71 | }
72 | \description{
73 | Plots a heatmap of the copy number data.
74 | Each row is a cell and colums represent genomic positions.
75 | }
76 | \details{
77 | \itemize{
78 | \item{order_cells}: If order_cells argument is set to 'consensus_tree'
79 | \code{\link{plotHeatmap}} checks for the existence of a consensus matrix.
80 | From the consensus matrix, a minimum evolution tree is built and cells are
81 | ordered following the order of their respective groups from the tree.
82 | If order_cells is 'hclust' cells are ordered according to hierarchical
83 | clustering. 'hclust' calculation can be sped up by changing the parameter
84 | 'n_threads' if you have more threads available to use. If order_cells
85 | is NULL the order of cells will be the same as the current order inside
86 | the CopyKit object (colnames(CopyKit)).
87 |
88 | \item{label}: A vector with the string names of the columns from
89 | \code{\link[SummarizedExperiment]{colData}} for heatmap annotation. The
90 | 'label' argument can take as many columns as desired as argument as long
91 | as they are elements from \code{\link[SummarizedExperiment]{colData}}.
92 |
93 | \item{label_colors}: A named list, list element names must match column
94 | names for \code{\link[SummarizedExperiment]{colData}} and list elements
95 | must match the number of items present in the columns provided in argument
96 | 'label'. For example: to set colors for column 'outlier' containing
97 | elements 'TRUE' or 'FALSE' a valid input would be:
98 | 'list(outlier = c('FALSE' = 'green', 'TRUE' = 'red))'.
99 | Default colors are provided for 'superclones', 'subclones',
100 | 'is_aneuploid', and 'outlier' that can be override with 'label_colors'.
101 |
102 | \item{rounding_error}: Must be used with assay = 'integer'.
103 | \code{plotHeatmap} will access the ploidies into colData(scCNA)$ploidy
104 | that are generated from \code{\link{calcInteger}} and scale rounded integer
105 | values to the segment means. Later this scaled matrix will be subtracted
106 | from the 'integer' assay from \code{\link{calcInteger}} and the resulting
107 | matrix from this subtraction will be plotted. Useful to visualize regions
108 | of high rounding error. Such regions can indicate issues with the ploidy
109 | scaling in use.
110 |
111 | \item{consensus}: If set to TRUE, \code{\link{plotHeatmap}} will search for
112 | the consensus matrix in the slot \code{\link{consensus}} and plot the
113 | resulting matrix. Labels annotations can be added with the argument 'label'.
114 |
115 | }
116 | }
117 | \examples{
118 | copykit_obj <- copykit_example_filtered()
119 | set.seed(1000)
120 | copykit_obj <- copykit_obj[, sample(200)]
121 | copykit_obj <- findClusters(copykit_obj)
122 | copykit_obj <- calcConsensus(copykit_obj)
123 | copykit_obj <- runConsensusPhylo(copykit_obj)
124 | colData(copykit_obj)$section <- stringr::str_extract(
125 | colData(copykit_obj)$sample,
126 | "(L[0-9]+L[0-9]+|L[0-9]+)"
127 | )
128 | plotHeatmap(copykit_obj, label = c("section", "subclones"))
129 | }
130 | \references{
131 | Zuguang Gu, Roland Eils, Matthias Schlesner, Complex heatmaps
132 | reveal patterns and correlations in multidimensional genomic data,
133 | Bioinformatics, Volume 32, Issue 18, 15 September 2016, Pages 2847–2849,
134 | https://doi.org/10.1093/bioinformatics/btw313
135 | }
136 | \seealso{
137 | \code{\link{calcInteger}}.
138 | }
139 | \author{
140 | Darlan Conterno Minussi
141 | }
142 |
--------------------------------------------------------------------------------
/man/plotMetrics.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotMetrics.R
3 | \name{plotMetrics}
4 | \alias{plotMetrics}
5 | \title{plotMetrics}
6 | \usage{
7 | plotMetrics(scCNA, metric, label = NULL, dodge.width = 0, ncol = 2)
8 | }
9 | \arguments{
10 | \item{scCNA}{scCNA object.}
11 |
12 | \item{metric}{A character indicating which elements of \code{colData()}
13 | should be plotted.}
14 |
15 | \item{label}{A character indicating which element of the \code{colData()} to
16 | color the plots.}
17 |
18 | \item{dodge.width}{A numeric that adds dodge between the label categories.}
19 |
20 | \item{ncol}{A Integer specifying the number of columns to be used for the
21 | panels of a multi-facet plot.}
22 | }
23 | \value{
24 | A ggplot object with swarm plots of the selected metrics.
25 | }
26 | \description{
27 | Plots swarm plots from selected elements of \code{\link[SummarizedExperiment]{colData}}.
28 | }
29 | \examples{
30 | copykit_obj <- mock_bincounts()
31 | copykit_obj <- runMetrics(copykit_obj)
32 | }
33 | \author{
34 | Darlan Conterno Minussi
35 | }
36 |
--------------------------------------------------------------------------------
/man/plotPca.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotPca.R
3 | \name{plotPca}
4 | \alias{plotPca}
5 | \title{plotPca}
6 | \usage{
7 | plotPca(scCNA, embedding = "PCA", label = NULL)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{embedding}{String with the name of the reducedDim to pull data from.}
13 |
14 | \item{label}{A string with the elements from
15 | \code{\link[SummarizedExperiment]{colData}} to color the umap points.}
16 | }
17 | \value{
18 | A ggplot object containing the reduced dimensions UMAP plot.
19 | }
20 | \description{
21 | Plots PCA embedding stored in \code{\link[SingleCellExperiment]{reducedDim}}
22 | slot.
23 | }
24 | \details{
25 | A reduced dimension representation with UMAP in the slot
26 | \code{\link[SingleCellExperiment]{reducedDim}} from the scCNA object.
27 |
28 | Columns from \code{\link[SummarizedExperiment]{colData}} can
29 | be used as an argument for 'label' to color the points on the plot.
30 | }
31 | \examples{
32 | set.seed(1000)
33 | copykit_obj <- copykit_example_filtered()[,sample(300)]
34 | copykit_obj <- runPca(copykit_obj)
35 |
36 | plotPca(copykit_obj)
37 |
38 | copykit_obj <- findClusters(copykit_obj)
39 |
40 | plotPca(copykit_obj, label = "subclones")
41 |
42 | }
43 | \author{
44 | Darlan Conterno Minussi
45 | }
46 |
--------------------------------------------------------------------------------
/man/plotPhylo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotPhylo.R
3 | \name{plotPhylo}
4 | \alias{plotPhylo}
5 | \title{plotPhylo()}
6 | \usage{
7 | plotPhylo(
8 | scCNA,
9 | label = NULL,
10 | label_colors = NULL,
11 | consensus = FALSE,
12 | group = NULL
13 | )
14 | }
15 | \arguments{
16 | \item{scCNA}{scCNA object.}
17 |
18 | \item{label}{A string with the element of
19 | \code{\link[SummarizedExperiment]{colData}}. to annotate the tips of the
20 | tree.}
21 |
22 | \item{label_colors}{A named list with colors for the label annotation.
23 | Must match label length}
24 |
25 | \item{consensus}{A boolean indicating if the consensus phylogenetic tree
26 | should be plotted.}
27 |
28 | \item{group}{A string that if provided will plot the tip labels as pie charts
29 | with the proportions from the provided element from
30 | \code{\link[SummarizedExperiment]{colData}}}
31 | }
32 | \value{
33 | A ggplot object with a phylogenetic tree visualization.
34 | }
35 | \description{
36 | Plots a phylogenetic tree.
37 | }
38 | \examples{
39 | set.seed(1000)
40 | copykit_obj <- copykit_example_filtered()[,sample(100)]
41 | copykit_obj <- findClusters(copykit_obj)
42 | copykit_obj <- runPhylo(copykit_obj)
43 | plotPhylo(copykit_obj, label = "subclones")
44 | }
45 | \author{
46 | Junke Wang
47 | }
48 |
--------------------------------------------------------------------------------
/man/plotRatio.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotRatio.R
3 | \name{plotRatio}
4 | \alias{plotRatio}
5 | \title{Plot ratio}
6 | \usage{
7 | plotRatio(scCNA, sample_name = NULL)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{sample_name}{Optional character vector with the name of the sample to
13 | be visualized}
14 | }
15 | \value{
16 | Opens an app for interactive visualization of the ratio plots where
17 | the desired cell can be selected. If a 'sample_name' is provided,
18 | returns a ggplot object with the ratio plot for the selected cell.
19 | }
20 | \description{
21 | plotRatio allows for a visualization of the segment ratios together with the
22 | ratios.
23 | }
24 | \details{
25 | plotRatio will return a ratio plot for the selected cell. If
26 | \code{\link{calcInteger}} was run and an 'integer' assay exists, plotRatio
27 | will color the ratio dots based on the copy number integer state of the
28 | segment automatically.
29 | }
30 | \examples{
31 | \dontrun{
32 | copykit_obj <- copykit_example_filtered()
33 | plotRatio(copykit_obj)
34 | }
35 |
36 | }
37 | \author{
38 | Darlan Conterno Minussi
39 | }
40 |
--------------------------------------------------------------------------------
/man/plotScree.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotScree.R
3 | \name{plotScree}
4 | \alias{plotScree}
5 | \title{plotScree}
6 | \usage{
7 | plotScree(scCNA, ncomponents = 20)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object}
11 |
12 | \item{ncomponents}{Number of principal components to plot.}
13 | }
14 | \value{
15 | A ggplot object with The variance explained per principal component.
16 | }
17 | \description{
18 | Plots the variance explained by the different principal components
19 | }
20 | \examples{
21 | set.seed(1000)
22 | copykit_obj <- copykit_example_filtered()[,sample(400)]
23 | copykit_obj <- runPca(copykit_obj)
24 | plotScree(copykit_obj)
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/man/plotSuggestedK.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotSuggestedK.R
3 | \name{plotSuggestedK}
4 | \alias{plotSuggestedK}
5 | \title{plotSuggestedK}
6 | \usage{
7 | plotSuggestedK(scCNA, geom = c("boxplot", "tile", "dotplot", "scatterplot"))
8 | }
9 | \arguments{
10 | \item{scCNA}{The scCNA object.}
11 |
12 | \item{geom}{A character with the geom to be used for plotting.}
13 | }
14 | \value{
15 | A ggplot2 object with the plot of different tested k values and their
16 | jaccard similarity for each subclone
17 | }
18 | \description{
19 | Uses the information from \code{\link{findSuggestedK}} to plot the values
20 | of jaccard similarity from the tested k range on \code{\link{findSuggestedK}}.
21 | }
22 | \details{
23 | \code{\link{plotSuggestedK}} access the \code{\link[S4Vectors]{metadata}}
24 | element suggestedK_df that is saved to the scDNA object after running
25 | \code{\link{findSuggestedK}}. The dataframe is used for plotting either a
26 | heatmap, when the argument geom = 'tile', or a dotplot when argument geom =
27 | 'dotplot' or a boxplot when geom = 'boxplot'.
28 |
29 | \itemize{
30 | \item{geom = 'boxplot':} Plots a boxplot of the jaccard similarities across
31 | all clusters detected in the grid search. The large red points represent
32 | the mean jaccard similarity.
33 |
34 | #' \item{geom = 'tile':} Plots a heatmap of the jaccard similarities across
35 | all clusters detected in the grid search. The filling collors represent the
36 | jaccard similarity value. Rows represent clusters and columns the k value.
37 |
38 | #' \item{geom = 'dotplot':} Plots a dotplot of the jaccard similarities across
39 | all clusters detected in the grid search. Where the size of the dots represent
40 | the jaccard similarity for each assesed k value.
41 |
42 | #' \item{geom = 'scatterplot':} Plots a scatterplot of the jaccard similarity
43 | explained by the number of cells. Points are colored by subclone and lines
44 | represent a linear regression across the points.
45 |
46 | }
47 | }
48 | \examples{
49 | copykit_obj <- copykit_example_filtered()
50 | copykit_obj <- findSuggestedK(copykit_obj)
51 | plotSuggestedK(copykit_obj)
52 | }
53 |
--------------------------------------------------------------------------------
/man/plotUmap.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotUmap.R
3 | \name{plotUmap}
4 | \alias{plotUmap}
5 | \title{plotUmap}
6 | \usage{
7 | plotUmap(scCNA, embedding = "umap", label = NULL)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{embedding}{String with the name of the reducedDim to pull data from.}
13 |
14 | \item{label}{A string with the elements from
15 | \code{\link[SummarizedExperiment]{colData}} to color the umap points.}
16 | }
17 | \value{
18 | A ggplot object containing the reduced dimensions UMAP plot.
19 | }
20 | \description{
21 | Plots UMAP embedding stored in \code{\link[SingleCellExperiment]{reducedDim}}
22 | slot.
23 | }
24 | \details{
25 | A reduced dimension representation with UMAP in the slot
26 | \code{\link[SingleCellExperiment]{reducedDim}} from the scCNA object.
27 |
28 | Columns from \code{\link[SummarizedExperiment]{colData}} can
29 | be used as an argument for 'label' to color the points on the plot.
30 | }
31 | \examples{
32 | set.seed(1000)
33 | copykit_obj <- copykit_example_filtered()[,sample(300)]
34 | copykit_obj <- runUmap(copykit_obj)
35 |
36 | plotUmap(copykit_obj)
37 |
38 | copykit_obj <- findClusters(copykit_obj)
39 |
40 | plotUmap(copykit_obj, label = "subclones")
41 |
42 | colData(copykit_obj)$section <- stringr::str_extract(
43 | colData(copykit_obj)$sample,
44 | "(L[0-9]+L[0-9]+|L[0-9]+)"
45 | )
46 |
47 | plotUmap(copykit_obj, label = c("section"))
48 | }
49 | \author{
50 | Darlan Conterno Minussi
51 | }
52 |
--------------------------------------------------------------------------------
/man/plotVariableGenes.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/plotVariableGenes.R
3 | \name{plotVariableGenes}
4 | \alias{plotVariableGenes}
5 | \title{plotVariableGenes}
6 | \usage{
7 | plotVariableGenes(scCNA, n = 30)
8 | }
9 | \arguments{
10 | \item{scCNA}{scCNA object.}
11 |
12 | \item{n}{A numeric defining how many variable genes will be plotted.}
13 | }
14 | \value{
15 | A ggplot object with a plot of the variable genes detected.
16 | }
17 | \description{
18 | Visualization for the most variable genes found with \code{findVariableGenes}.
19 | }
20 | \details{
21 | \code{plotVariableGenes} plots the list of genes that was found
22 | using \code{findVariableGenes}.
23 | }
24 | \examples{
25 | copykit_obj <- copykit_example_filtered()
26 | copykit_obj <- findVariableGenes(copykit_obj,
27 | genes = c("FHIT", "PTEN", "FOXO1", "BRCA1")
28 | )
29 | plotVariableGenes(copykit_obj)
30 | }
31 | \seealso{
32 | \code{\link{findVariableGenes}}
33 | }
34 |
--------------------------------------------------------------------------------
/man/runConsensusPhylo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runConsensusPhylo.R
3 | \name{runConsensusPhylo}
4 | \alias{runConsensusPhylo}
5 | \title{runConsensusPhylo}
6 | \usage{
7 | runConsensusPhylo(scCNA, root = c("mrca", "neutral", "user"), root_user = NULL)
8 | }
9 | \arguments{
10 | \item{scCNA}{The scCNA object.}
11 |
12 | \item{root}{A string indicating how to root the consensus tree.}
13 |
14 | \item{root_user}{A numeric with the vector to be used as root of the tree if
15 | \code{root} is set to 'user'. Must have the same length as the number of bins
16 | of the genome scaffold.}
17 | }
18 | \value{
19 | A phylo object with a consensus tree stored in the consensusPhylo slot
20 | of the CopyKit object.
21 | }
22 | \description{
23 | Runs a minimal evolution tree algorithm for the consensus data frame
24 | }
25 | \examples{
26 | copykit_obj <- copykit_example_filtered()
27 | copykit_obj <- findClusters(copykit_obj)
28 | copykit_obj <- calcConsensus(copykit_obj)
29 | copykit_obj <- runConsensusPhylo(copykit_obj)
30 | plotPhylo(copykit_obj, consensus = TRUE, label = "subclones")
31 | }
32 |
--------------------------------------------------------------------------------
/man/runCountReads.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runCountReads.R
3 | \name{runCountReads}
4 | \alias{runCountReads}
5 | \title{Aligns the reads from the BAM file to the variable binning pipeline.}
6 | \usage{
7 | runCountReads(
8 | dir,
9 | genome = c("hg38", "hg19"),
10 | resolution = c("220kb", "55kb", "110kb", "195kb", "280kb", "500kb", "1Mb", "2.8Mb"),
11 | remove_Y = FALSE,
12 | min_bincount = 10,
13 | is_paired_end = FALSE,
14 | BPPARAM = bpparam()
15 | )
16 | }
17 | \arguments{
18 | \item{dir}{A path for the directory containing BAM files from short-read
19 | sequencing.}
20 |
21 | \item{genome}{Name of the genome assembly. Default: 'hg38'.}
22 |
23 | \item{resolution}{The resolution of the VarBin method. Default: '220kb'.}
24 |
25 | \item{remove_Y}{(default == FALSE) If set to TRUE, removes information from
26 | the chrY from the dataset.}
27 |
28 | \item{min_bincount}{A numerical indicating the minimum mean bin counts a
29 | cell should have to remain in the dataset.}
30 |
31 | \item{is_paired_end}{A boolean indicating if bam files are from single-read
32 | or pair end sequencing.}
33 |
34 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
35 | should be parallelized.}
36 | }
37 | \value{
38 | A matrix of bin counts within the scCNA object that can be accessed
39 | with \code{bincounts}
40 |
41 | #' @references
42 | Navin, N., Kendall, J., Troge, J. et al. Tumour evolution inferred by
43 | single-cell sequencing. Nature 472, 90–94 (2011).
44 | https://doi.org/10.1038/nature09807
45 |
46 | Baslan, T., Kendall, J., Ward, B., et al (2015). Optimizing sparse sequencing
47 | of single cells for highly multiplex copy number profiling.
48 | Genome research, 25(5), 714–724. https://doi.org/10.1101/gr.188060.114
49 | }
50 | \description{
51 | runCountReads performs the variable binning (VarBin) algorithm to a series of
52 | BAM files resulting from short-read sequencing.
53 | }
54 | \details{
55 | \code{runCountReads} takes as input duplicate marked BAM files from
56 | whole genome sequencing and runs the variable binning pipeline algorithm.
57 | It is important that BAM files are duplicate marked. Briefly, the genome is
58 | split into pre-determined bins. The bin size is controlled by the argument
59 | \code{resolution}. By using VarBin, for a diploid cell, each bin will
60 | receive equal amount of reads, controlling for mappability.
61 | A lowess function is applied to perform GC correction across the bins.
62 | The argument \code{genome} can be set to 'hg38' or 'hg19' to select the
63 | scaffolds genome assembly. The scaffolds are GenomicRanges objects
64 | Information regarding the alignment of the reads to the bins and from the bam
65 | files are stored in the #' \code{\link[SummarizedExperiment]{colData}}.
66 | \code{min_bincount} Indicates the minimum mean bincount a cell must present
67 | to be kept in the dataset. Cells with low bincounts generally present bin
68 | dropouts due to low read count that will be poorly segmented.
69 | }
70 | \examples{
71 | \dontrun{
72 | copykit_obj <- runCountReads("/PATH/TO/BAM/FILES")
73 | }
74 |
75 | }
76 | \author{
77 | Darlan Conterno Minussi
78 | }
79 |
--------------------------------------------------------------------------------
/man/runDistMat.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runDistMat.R
3 | \name{runDistMat}
4 | \alias{runDistMat}
5 | \title{Run distance matrix calculations}
6 | \usage{
7 | runDistMat(scCNA, metric = "euclidean", n_threads = 1)
8 | }
9 | \arguments{
10 | \item{scCNA}{scCNA object.}
11 |
12 | \item{metric}{distance metric passed to calculate the distance matrix.}
13 |
14 | \item{n_threads}{Number of threads used to calculate the distance matrix.
15 | Passed to `amap::Dist`.}
16 | }
17 | \value{
18 | A distance matrix in the slot \code{distMat} from scCNA object.
19 | Access the distance matrix with: \code{distMat(scCNA, withDimnames = TRUE)}
20 | }
21 | \description{
22 | Performs distance matrix calculations that can be downstream used for
23 | hierarchical clustering or phylogenetic analysis. Uses \code{amap::Dist()}
24 | in order to parallelize distance calculations.
25 | }
26 | \examples{
27 | copykit_obj <- copykit_example_filtered()[,1:10]
28 | copykit_obj <- runDistMat(copykit_obj)
29 | }
30 | \author{
31 | Darlan Conterno Minussi
32 | }
33 |
--------------------------------------------------------------------------------
/man/runMetrics.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runMetrics.R
3 | \name{runMetrics}
4 | \alias{runMetrics}
5 | \title{Run metrics}
6 | \usage{
7 | runMetrics(scCNA, BPPARAM = bpparam())
8 | }
9 | \arguments{
10 | \item{scCNA}{scCNA object.}
11 |
12 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
13 | should be parallelized.}
14 | }
15 | \value{
16 | Adds columns 'overdispersion' and 'breakpoint_count' to
17 | \code{\link[SummarizedExperiment]{colData}}.
18 | }
19 | \description{
20 | Calculates the overdispersion and the breakpoint counts for each cell.
21 | }
22 | \details{
23 | Adds the metrics to the scCNA \code{\link[SummarizedExperiment]{colData}}.
24 | Those metrics can be used for subsetting the data if desired.
25 | results can be visualized with \code{\link{plotMetrics}}.
26 | }
27 | \examples{
28 | copykit_obj <- mock_bincounts()
29 | copykit_obj <- runMetrics(copykit_obj)
30 | }
31 | \author{
32 | Darlan Conterno Minussi
33 | }
34 |
--------------------------------------------------------------------------------
/man/runPca.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runPca.R
3 | \name{runPca}
4 | \alias{runPca}
5 | \title{runPca()}
6 | \usage{
7 | runPca(scCNA, assay = "logr", name = "PCA", scale = FALSE, ...)
8 | }
9 | \arguments{
10 | \item{scCNA}{The CopyKit object.}
11 |
12 | \item{assay}{String with the name of the assay to pull data from to make the
13 | embedding.}
14 |
15 | \item{name}{String specifying the name to be used to store the result in the
16 | reducedDims of the output.}
17 |
18 | \item{scale}{A logical value indicating whether the variables should be
19 | scaled to have unit variance before the analysis takes place.}
20 |
21 | \item{...}{Additional parameters passed to \code{\link[stats]{prcomp}}.}
22 | }
23 | \value{
24 | A reduced dimension representation with pca in the slot
25 | \code{reducedDim} from scCNA object. Access reduced dimensions slot with:
26 | \code{reducedDim(scCNA, 'PCA', withDimnames = FALSE)}
27 | }
28 | \description{
29 | Creates a pca embedding using the package uwot from the segment ratios values
30 | }
31 | \examples{
32 | set.seed(1000)
33 | copykit_obj <- copykit_example_filtered()[,sample(100)]
34 | copykit_obj <- runPca(copykit_obj)
35 | }
36 | \author{
37 | Darlan Conterno Minussi
38 | }
39 |
--------------------------------------------------------------------------------
/man/runPhylo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runPhylo.R
3 | \name{runPhylo}
4 | \alias{runPhylo}
5 | \title{Run phylogenetic analysis}
6 | \usage{
7 | runPhylo(
8 | scCNA,
9 | method = "nj",
10 | metric = "euclidean",
11 | assay = "segment_ratios",
12 | n_threads = parallel::detectCores()/4
13 | )
14 | }
15 | \arguments{
16 | \item{scCNA}{scCNA object.}
17 |
18 | \item{method}{Phylogenetic method to be run, currently accepts "nj" (neighbor-joining) and "me" (minimum evolution). Defaults to "nj".}
19 |
20 | \item{metric}{distance metric passed to construct the phylogeny (Defaults to "euclidean").}
21 |
22 | \item{assay}{String with the name of the assay to pull data from to run phylogenetic analysis. Note that only assay named "integer" will be treated as integer.}
23 |
24 | \item{n_threads}{Number of threads used to calculate the distance matrix. Passed to `amap::Dist`}
25 | }
26 | \value{
27 | A rooted phylogenetic tree object in the slot \code{phylo} from scCNA object. Access phylo slot with: \code{copykit::phylo(scCNA)}
28 | }
29 | \description{
30 | Performs phylogenetic analysis
31 | }
32 | \examples{
33 | set.seed(1000)
34 | copykit_obj <- copykit_example_filtered()[,sample(50)]
35 | copykit_obj <- runPhylo(copykit_obj)
36 | }
37 | \author{
38 | Darlan Conterno Minussi
39 |
40 | Junke Wang
41 | }
42 |
--------------------------------------------------------------------------------
/man/runSegmentation.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runSegmentation.R
3 | \name{runSegmentation}
4 | \alias{runSegmentation}
5 | \title{Run Segmentation}
6 | \usage{
7 | runSegmentation(
8 | scCNA,
9 | method = c("CBS", "multipcf"),
10 | seed = 17,
11 | alpha = 1e-05,
12 | merge_levels_alpha = 1e-05,
13 | gamma = 40,
14 | undo.splits = "prune",
15 | name = "segment_ratios",
16 | BPPARAM = bpparam()
17 | )
18 | }
19 | \arguments{
20 | \item{scCNA}{The scCNA object}
21 |
22 | \item{method}{A character with the segmentation method of choice.}
23 |
24 | \item{seed}{Numeric. Set seed for CBS permutation reproducibility}
25 |
26 | \item{alpha}{A numeric with the significance levels for the test to accept
27 | change-points for CBS segmentation. See \code{\link[DNAcopy]{segment}}.}
28 |
29 | \item{merge_levels_alpha}{A numeric with the significance levels for the
30 | merge levels test to accept two different segments.}
31 |
32 | \item{gamma}{A numeric passed on to 'multipcf' segmentation. Penalty for each
33 | discontinuity in the curve. \code{\link[copynumber]{multipcf}}.}
34 |
35 | \item{undo.splits}{A character string specifying how change-points are to be
36 | undone, if at all. Default is "none". Other choices are "prune", which uses
37 | a sum of squares criterion, and "sdundo", which undoes splits that are not
38 | at least this many SDs apart. See \code{\link[DNAcopy]{segment}}}
39 |
40 | \item{name}{Character. Target slot for the resulting segment ratios.}
41 |
42 | \item{BPPARAM}{A \linkS4class{BiocParallelParam} specifying how the function
43 | should be parallelized.}
44 | }
45 | \value{
46 | The segment profile for all cells inside the scCNA object.
47 | }
48 | \description{
49 | Runs a segmentation algorithm using the ratio data.
50 | }
51 | \details{
52 | \itemize{
53 |
54 | \item{CBS:} #' \code{runSegmentation} Fits a piece-wise constant function
55 | to the transformed the smoothed bin counts. Bin counts are smoothed with
56 | \code{\link[DNAcopy]{smooth.CNA}} using the Circular Binary Segmentation
57 | (CBS) algorithm from \code{\link[DNAcopy]{segment}} with default it
58 | applies undo.prune with value of 0.05.
59 |
60 | \item{multipcf:} Performs the joint segmentation from the
61 | \code{copynumber} package using the \code{\link[copynumber]{multipcf}}
62 | function. By fitting piecewise constant curves with common breakpoints
63 | for all samples.
64 |
65 | }
66 |
67 |
68 | The resulting segment means are further refined with MergeLevels to join
69 | adjacent segments with non-significant differences in segmented means.
70 | }
71 | \examples{
72 | copykit_obj <- mock_bincounts(ncells = 10)
73 | copykit_obj <- runSegmentation(copykit_obj)
74 | }
75 |
--------------------------------------------------------------------------------
/man/runUmap.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runUmap.R
3 | \name{runUmap}
4 | \alias{runUmap}
5 | \title{Creates UMAP embedding}
6 | \usage{
7 | runUmap(
8 | scCNA,
9 | assay = "logr",
10 | seed = 17,
11 | min_dist = 0,
12 | n_neighbors = 50,
13 | name = "umap",
14 | ncomponents = 2,
15 | ...
16 | )
17 | }
18 | \arguments{
19 | \item{scCNA}{scCNA object.}
20 |
21 | \item{assay}{String with the name of the assay to pull data from to make the
22 | embedding.}
23 |
24 | \item{seed}{Sets a seed for the pseudorandom number generator.}
25 |
26 | \item{min_dist}{The effective minimum distance between embedded points.
27 | Smaller values will result in a more clustered/clumped embedding where nearby
28 | points on the manifold are drawn closer together, while larger values will
29 | result on a more even dispersal of points. The value should be set relative
30 | to the spread value, which determines the scale at which embedded points
31 | will be spread out. See \code{\link[uwot]{umap}}.}
32 |
33 | \item{n_neighbors}{The size of local neighborhood (in terms of number of
34 | neighboring sample points) used for manifold approximation.
35 | Larger values result in more global views of the manifold,
36 | while smaller values result in more local data being preserved.
37 | In general values should be in the range 2 to 100.
38 | See \code{\link[uwot]{umap}}.}
39 |
40 | \item{name}{String specifying the name to be used to store the result in the
41 | reducedDims of the output.}
42 |
43 | \item{ncomponents}{The dimension of the space to embed into. See
44 | \code{\link[uwot]{umap}}.}
45 |
46 | \item{...}{Additional parameters passed to \code{\link[uwot]{umap}}.}
47 | }
48 | \value{
49 | A reduced dimension representation with UMAP in the slot
50 | \code{reducedDim} from scCNA object. Access reduced dimensions slot with:
51 | \code{reducedDim(scCNA, 'umap', withDimnames = FALSE)}
52 | }
53 | \description{
54 | Creates a umap embedding using the package uwot from the segment ratios
55 | values
56 | }
57 | \examples{
58 | copykit_obj <- copykit_example_filtered()
59 | copykit_obj <- runUmap(copykit_obj)
60 | }
61 | \author{
62 | Darlan Conterno Minussi
63 | }
64 |
--------------------------------------------------------------------------------
/man/runVst.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/runVst.R
3 | \name{runVst}
4 | \alias{runVst}
5 | \title{Variance Stabilizing Transformation}
6 | \usage{
7 | runVst(scCNA, transformation = c("ft", "log"), assay = "bincounts")
8 | }
9 | \arguments{
10 | \item{scCNA}{The scCNA object}
11 |
12 | \item{transformation}{A character indicating the variance stabilization
13 | transformation to be performed. See \link{runVst} details.}
14 |
15 | \item{assay}{A character indicating the assay slot to extract the bincounts
16 | for variance stabilization}
17 | }
18 | \value{
19 | A slot into the scCNA object containing the variance stabilized matrix.
20 | }
21 | \description{
22 | Performs variance stabilization transformation of the bin counts
23 | }
24 | \details{
25 | \code{runVst} performs variance stabilization to reduce the overdispersion
26 | from the negative binomial distribution nature of the bin counts and reduce
27 | technical bias. The argument \code{vst} controls the choice of the transformation
28 | allowing either the Freeman-Tukey transformation by using the option 'ft' (recommended)
29 | or a logarithmic transformation with the option 'log'. Using a 'log' transformation
30 | may result in long segmentation times for a few cells with large breakpoint counts.
31 | }
32 | \examples{
33 | copykit_obj <- mock_bincounts(ncells = 10)
34 | copykit_obj <- runVst(copykit_obj)
35 | }
36 | \references{
37 | Freeman, M. F.; Tukey, J. W. (1950), "Transformations related to the angular
38 | and the square root", The Annals of Mathematical Statistics,
39 | 21 (4), pp. 607–611, doi:10.1214/aoms/1177729756, JSTOR 2236611
40 | }
41 |
--------------------------------------------------------------------------------
/snakemake_pipelines/bowtie2_markdup/README.md:
--------------------------------------------------------------------------------
1 | # Alignment and Mark Duplicates
2 |
3 | This [snakemake](https://snakemake.readthedocs.io/en/stable/) pipeline performs alignment and removal of PCR duplicates from a fastq file.
4 |
5 | # Output
6 |
7 | A sorted `.bam` file for each aligned sampled with duplicates marked.
8 |
9 | # Installation
10 |
11 | Make sure to install and properly run snakemake, clone this repository and run the snakefile.
12 |
13 | # Usage
14 |
15 | All `.fastq` files must be inside a folder called `fastq`. After that run:
16 |
17 | ```
18 | snakemake --snakefile /PATH/TO/SNAKEFILE/bowtie_markdup.smk --cores 60
19 | ```
20 |
21 | For paired-end reads, run:
22 | ```
23 | snakemake --snakefile /PATH/TO/SNAKEFILE/bowtie2_markdup_pairend.smk --cores 60
24 | ```
25 |
26 |
27 | # Dependencies
28 |
29 | - snakemake
30 | - sambamba
31 |
32 | # Pipeline steps
33 |
34 | This pipelines uses `bowtie2` to align reads to hg38 and `sambamba` to mark duplicates.
35 |
36 |
--------------------------------------------------------------------------------
/snakemake_pipelines/bowtie2_markdup/bowtie2_markdup.smk:
--------------------------------------------------------------------------------
1 | samples, = glob_wildcards("fastq/{sample}.fastq.gz")
2 | samtools_path="samtools-1.13/samtools"
3 |
4 | rule all:
5 | input:
6 | expand('marked/{sample}.bam', sample=samples)
7 |
8 |
9 | rule bowtie2:
10 | input:
11 | r1 = "fastq/{sample}.fastq.gz",
12 | output:
13 | temp("mapped/{sample}.bam")
14 | log:
15 | "logs/bowtie2/{sample}.log"
16 | params:
17 | bowtie2_path="bowtie2-2.4.4/bowtie2",
18 | bowtie2_index="Homo_sapiens/UCSC/hg38/Sequence/Bowtie2_2.4.4_Index/hg38",
19 | threads: 8
20 | shell:
21 | "({params.bowtie2_path} -x {params.bowtie2_index} -p {threads} -U {input.r1} | {samtools_path} view -Sb -@ {threads} > {output}) 2> {log}"
22 |
23 | rule sort:
24 | input:
25 | "mapped/{sample}.bam"
26 | output:
27 | temp("sort/{sample}.bam")
28 | threads: 4
29 | shell:
30 | "{samtools_path} sort {input} -@ {threads} -o {output}"
31 |
32 | rule index:
33 | input:
34 | "sort/{sample}.bam"
35 | output:
36 | temp("sort/{sample}.bam.bai")
37 | shell:
38 | "{samtools_path} index {input}"
39 |
40 | rule sambamba_markdup:
41 | input:
42 | "sort/{sample}.bam",
43 | output:
44 | "marked/{sample}.bam"
45 | threads: 4
46 | shell:
47 | "sambamba/sambamba-0.7.0-linux-static markdup -t {threads} {input} {output}"
48 |
49 |
--------------------------------------------------------------------------------
/snakemake_pipelines/bowtie2_markdup/bowtie2_markdup_pairend.smk:
--------------------------------------------------------------------------------
1 | (samples,reads,) = glob_wildcards("fastq/{sample}_{read}.fastq.gz")
2 | reads=["R1","R2"]
3 | samples=list(set(samples))
4 | samtools_path="samtools/samtools-1.13/samtools"
5 |
6 | rule all:
7 | input:
8 | expand('marked/{sample}.bam', sample=samples)
9 |
10 |
11 | rule bowtie2:
12 | input:
13 | r1 = "fastq/{sample}_R1.fastq.gz",
14 | r2 = "fastq/{sample}_R2.fastq.gz"
15 | output:
16 | temp("mapped/{sample}.bam")
17 | log:
18 | "logs/bowtie2/{sample}.log"
19 | params:
20 | bowtie2_path="Bowtie/bowtie2-2.4.2-linux-x86_64/bowtie2",
21 | bowtie2_index="Homo_sapiens/UCSC/hg38/Sequence/Bowtie2_2.3.5.1_Index/hg38",
22 | threads: 8
23 | shell:
24 | "({params.bowtie2_path} -x {params.bowtie2_index} -p {threads} -1 {input.r1} -2 {input.r2} | {samtools_path} view -Sb -@ {threads} > {output}) 2> {log}"
25 |
26 | rule sort:
27 | input:
28 | "mapped/{sample}.bam"
29 | output:
30 | temp("sort/{sample}.bam")
31 | threads: 4
32 | shell:
33 | "{samtools_path} sort {input} -@ {threads} -o {output}"
34 |
35 | rule index:
36 | input:
37 | "sort/{sample}.bam"
38 | output:
39 | temp("sort/{sample}.bam.bai")
40 | shell:
41 | "{samtools_path} index {input}"
42 |
43 | rule sambamba_markdup:
44 | input:
45 | "sort/{sample}.bam",
46 | output:
47 | "marked/{sample}.bam"
48 | threads: 4
49 | shell:
50 | "sambamba/sambamba-0.8.1-linux-amd64-static markdup -t {threads} {input} {output}"
51 |
52 |
--------------------------------------------------------------------------------
/snakemake_pipelines/markdup/markdup.smk:
--------------------------------------------------------------------------------
1 | samples, = glob_wildcards("bam/{sample}.bam")
2 | samtools_path="/PATH/TO/SAMTOOLS/"
3 |
4 | rule all:
5 | input:
6 | expand('marked/{sample}.bam', sample=samples)
7 |
8 | rule index:
9 | input:
10 | "bam/{sample}.bam"
11 | output:
12 | temp("bam/{sample}.bam.bai")
13 | shell:
14 | "{samtools_path} index {input}"
15 |
16 | rule sambamba_markdup:
17 | input:
18 | bai="bam/{sample}.bam.bai",
19 | bam="bam/{sample}.bam"
20 | output:
21 | "marked/{sample}.bam"
22 | threads: 4
23 | shell:
24 | "/PATH/TO/sambamba/sambamba-0.7.0-linux-static markdup -t {threads} {input.bam} {output}"
25 |
26 |
--------------------------------------------------------------------------------
/tests/spelling.R:
--------------------------------------------------------------------------------
1 | if (requireNamespace("spelling", quietly = TRUE)) {
2 | spelling::spell_check_test(
3 | vignettes = TRUE, error = FALSE,
4 | skip_on_cran = TRUE
5 | )
6 | }
7 |
--------------------------------------------------------------------------------
/tests/testthat.R:
--------------------------------------------------------------------------------
1 | library(testthat)
2 | library(copykit)
3 |
4 | test_check("copykit")
5 |
--------------------------------------------------------------------------------
/tests/testthat/setup.R:
--------------------------------------------------------------------------------
1 | # Creating a test setup
2 |
--------------------------------------------------------------------------------
/tests/testthat/test-dimred-plots.R:
--------------------------------------------------------------------------------
1 | set.seed(1000)
2 | copykit_obj <- copykit_example_filtered()[,sample(200)]
3 | copykit_obj <- findClusters(copykit_obj)
4 | copykit_obj <- runPca(copykit_obj)
5 |
6 | test_that("Testing reduced embedding plots: ", {
7 | # testing UMAP
8 | expect_s3_class(p <- plotUmap(copykit_obj), "ggplot")
9 | expect_s3_class(p <- plotUmap(copykit_obj, label = "subclones"), "ggplot")
10 |
11 | # testing PCA
12 | expect_s3_class(p <- plotPca(copykit_obj), 'ggplot')
13 | expect_s3_class(p <- plotPca(copykit_obj, label = 'subclones'), 'ggplot')
14 | })
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-plotHeatmap.R:
--------------------------------------------------------------------------------
1 | # setup
2 | copykit_obj <- copykit_example_filtered()
3 | set.seed(1000)
4 | copykit_obj <- copykit_obj[, sample(70)]
5 | copykit_obj <- findClusters(copykit_obj)
6 | copykit_obj <- calcConsensus(copykit_obj)
7 | copykit_obj <- runConsensusPhylo(copykit_obj)
8 |
9 | #tests
10 |
11 | test_that("Testing plotting heatmap: ", {
12 | expect_s4_class(ht <- plotHeatmap(copykit_obj), "Heatmap")
13 |
14 | # checking visual parameters
15 | expect_s4_class(ht <-
16 | plotHeatmap(copykit_obj, label = "subclones"),
17 | "Heatmap")
18 |
19 | expect_s4_class(ht <- plotHeatmap(copykit_obj, genes = c("MYC",
20 | "TP53")),
21 | "Heatmap")
22 | })
23 |
--------------------------------------------------------------------------------
/tests/testthat/test-runSegmentation.R:
--------------------------------------------------------------------------------
1 | # setup
2 | copykit_obj_50kb <- mock_bincounts(
3 | ncells = 10,
4 | ncells_diploid = 5,
5 | position_gain = 1:50,
6 | position_del = 200:250,
7 | resolution = "55kb",
8 | run_segmentation = FALSE,
9 | run_lognorm = FALSE
10 | )
11 | copykit_obj_50kb <- runVst(copykit_obj_50kb)
12 |
13 | copykit_obj_100kb <- mock_bincounts(
14 | ncells = 10,
15 | ncells_diploid = 5,
16 | position_gain = 1:50,
17 | position_del = 200:250,
18 | resolution = "110kb",
19 | run_segmentation = FALSE,
20 | run_lognorm = FALSE
21 | )
22 |
23 | copykit_obj_175kb <- mock_bincounts(
24 | ncells = 10,
25 | ncells_diploid = 5,
26 | position_gain = 1:50,
27 | position_del = 200:250,
28 | resolution = "195kb",
29 | run_segmentation = FALSE,
30 | run_lognorm = FALSE
31 | )
32 |
33 | copykit_obj_200kb <- mock_bincounts(
34 | ncells = 10,
35 | ncells_diploid = 5,
36 | position_gain = 1:50,
37 | position_del = 200:250,
38 | resolution = "220kb",
39 | run_segmentation = FALSE,
40 | run_lognorm = FALSE
41 | )
42 |
43 | copykit_obj_250kb <- mock_bincounts(
44 | ncells = 10,
45 | ncells_diploid = 5,
46 | position_gain = 1:50,
47 | position_del = 200:250,
48 | resolution = "280kb",
49 | run_segmentation = FALSE,
50 | run_lognorm = FALSE
51 | )
52 |
53 | copykit_obj_500kb <- mock_bincounts(
54 | ncells = 10,
55 | ncells_diploid = 5,
56 | position_gain = 1:50,
57 | position_del = 200:250,
58 | resolution = "500kb",
59 | run_segmentation = FALSE,
60 | run_lognorm = FALSE
61 | )
62 |
63 | copykit_obj_1Mb <- mock_bincounts(
64 | ncells = 10,
65 | ncells_diploid = 5,
66 | position_gain = 1:50,
67 | position_del = 200:250,
68 | resolution = "1Mb",
69 | run_segmentation = FALSE,
70 | run_lognorm = FALSE
71 | )
72 |
73 | copykit_obj_2Mb <- mock_bincounts(
74 | ncells = 10,
75 | ncells_diploid = 5,
76 | position_gain = 1:50,
77 | position_del = 200:250,
78 | resolution = "2.8Mb",
79 | run_segmentation = FALSE,
80 | run_lognorm = FALSE
81 | )
82 |
83 |
84 | # test
85 | test_that("Testing CopyKit runSegmentation for different resolutions: ", {
86 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_50kb), "CopyKit")
87 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_100kb), "CopyKit")
88 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_175kb), "CopyKit")
89 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_200kb), "CopyKit")
90 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_250kb), "CopyKit")
91 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_500kb), "CopyKit")
92 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_1Mb), "CopyKit")
93 | expect_s4_class(copykit_obj <- runSegmentation(copykit_obj_2Mb), "CopyKit")
94 | })
95 |
--------------------------------------------------------------------------------
/vignettes/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 | *.R
3 |
--------------------------------------------------------------------------------
/vignettes/CopyKit_UserGuide.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | title: "CopyKit_UserGuide"
3 | output: rmarkdown::html_vignette
4 | vignette: >
5 | %\VignetteIndexEntry{CopyKit_UserGuide}
6 | %\VignetteEngine{knitr::rmarkdown}
7 | %\VignetteEncoding{UTF-8}
8 | ---
9 |
10 | Please go to [https://github.com/navinlabcode/CopyKit-UserGuide](https://github.com/navinlabcode/CopyKit-UserGuide) for the complete user guide.
11 |
12 | ```{r}
13 | sessionInfo()
14 | ```
15 |
16 |
--------------------------------------------------------------------------------