Skip to content

Commit

Permalink
Update clonalCluster
Browse files Browse the repository at this point in the history
Fixed issue with clustering naming, adding manual and vignette info for clarification, updated testthat
  • Loading branch information
ncborcherding committed Jan 15, 2024
1 parent 0ce50bb commit 823ca0a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/clonalCluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' The higher the number the more similarity of sequence will be
#' used for clustering.
#' @param group.by The column header used for to group contigs.
#' If (\strong{NULL}), clusters will be calculated across samples.
#' @param exportGraph Return an igraph object of connected
#' sequences (\strong{TRUE}) or the amended input with a
#' new cluster-based variable (\strong{FALSE}).
Expand Down Expand Up @@ -98,14 +99,13 @@ clonalCluster <- function(input.data,
group_by(bound[,ref2]) %>%
dplyr::summarize(sample_count = n(),
unique_samples = paste0(unique(group.by), collapse = ","))
dictionary <- list(bound)
} else {
bound <- bind_rows(dat)
graph.variables <- bind_rows(dat) %>%
group_by(bound[,ref2]) %>%
dplyr::summarize(sample_count = n())
dictionary <- dat
}
dictionary <- dat
#Generating Connected Component
output.list <- lapply(dictionary, function(x) {
cluster <- .lvCompare(x,
Expand Down
Binary file not shown.
Binary file modified tests/testthat/testdata/clustering/clonalCluster_TRBaa_data.rds
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion vignettes/articles/Clonal_Cluster.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ head(sub_combined[,c(1,2,13)])

### Clustering with a single-cell object

If performed over the number of samples, such as the list elements, **group.by** can used to calculate only the clusters on the setting of patient sample (**group.by** = "Patient") or tissue type (**group.by** = "Type"). This will add the selected group to the beginning of the cluster designation. We can also call ```clonalCluster()``` directly on a Single-Cell Object.
If performed over the number of samples, such as the list elements, **group.by** can used to calculate only the clusters on the setting of patient sample (**group.by** = "Patient") or tissue type (**group.by** = "Type"). This will add the selected group to the beginning of the cluster designation. We can also call ```clonalCluster()``` directly on a Single-Cell Object. If **group.by** = NULL (**default**), the clusters will be calculated across all samples.

```{r tidy = FALSE}
#Adding patient information
Expand Down

0 comments on commit 823ca0a

Please sign in to comment.