Skip to content

Commit

Permalink
check that clone genome plot works when filename = NULL and remove /d…
Browse files Browse the repository at this point in the history
…ontrun in .Rd file
  • Loading branch information
whelena committed Nov 4, 2024
1 parent 29c0fb2 commit 5f7c7a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/create.clone.genome.distribution.plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ create.clone.genome.distribution.plot.per.sample <- function(
# calculate densities for each cluster --------------------------------------------------------
density.list <- list();
for (k in unique(sample.df$clone.id)) {
if (sum(sample.df$clone.id == k) <= 1) {
if (sum(sample.df$clone.id == k, na.rm = TRUE) <= 1) {
warning(paste('Skipping clone', k, 'in sample', unique(sample.df$ID), 'since there is only one SNV'));
next;
}
Expand Down
6 changes: 2 additions & 4 deletions man/create.clone.genome.distribution.plot.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ This function preprocesses the input data frame, extracts chromosome information
setseed(123);
load(file.path(system.file('data', package = 'CancerEvolutionVisualization'), 'SNV.Rda'));

\dontrun{create.clone.genome.distribution.plot(
snv,
filename = './clone-genome-dist-plot.png'
)};
create.clone.genome.distribution.plot(snv);

}

0 comments on commit 5f7c7a4

Please sign in to comment.