diff --git a/404.html b/404.html index c8c0181..072c352 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@ clustur - 0.1 + 0.1.0 diff --git a/LICENSE-text.html b/LICENSE-text.html index 56e67d9..8a0c311 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 diff --git a/LICENSE.html b/LICENSE.html index 5a9e4ca..0d1e8d4 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 diff --git a/articles/clustur.html b/articles/clustur.html index 5855036..0834e9f 100644 --- a/articles/clustur.html +++ b/articles/clustur.html @@ -20,7 +20,7 @@ clustur - 0.1 + 0.1.0 diff --git a/articles/index.html b/articles/index.html index f4726ae..d60bd20 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 diff --git a/authors.html b/authors.html index 9c01748..60b2d62 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 @@ -61,13 +61,13 @@ Citation Johnson G, Westcott S, Schloss P (2024). clustur: Clustering. -R package version 0.1, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/. +R package version 0.1.0, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/. @Manual{, title = {clustur: Clustering}, author = {Gregory Johnson and Sarah Westcott and Patrick Schloss}, year = {2024}, - note = {R package version 0.1, https://github.com/SchlossLab/clustur}, + note = {R package version 0.1.0, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, } diff --git a/index.html b/index.html index 61ea500..ca3d342 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ clustur - 0.1 + 0.1.0 diff --git a/news/index.html b/news/index.html index 6144ccd..0b02ecd 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 diff --git a/pkgdown.yml b/pkgdown.yml index 8c467ac..04ca9ae 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: clustur: clustur.html -last_built: 2024-11-12T13:46Z +last_built: 2024-11-12T17:17Z urls: reference: http://www.schlosslab.org/clustur/reference article: http://www.schlosslab.org/clustur/articles diff --git a/reference/cluster.html b/reference/cluster.html index 68ecea1..9c13890 100644 --- a/reference/cluster.html +++ b/reference/cluster.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/clustur-package.html b/reference/clustur-package.html index debcd91..13775be 100644 --- a/reference/clustur-package.html +++ b/reference/clustur-package.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/create_sparse_matrix.html b/reference/create_sparse_matrix.html index 4d5177d..425117c 100644 --- a/reference/create_sparse_matrix.html +++ b/reference/create_sparse_matrix.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/example_path.html b/reference/example_path.html index 8658440..794ad08 100644 --- a/reference/example_path.html +++ b/reference/example_path.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_abundance.html b/reference/get_abundance.html index 6edb49d..cb7b5cf 100644 --- a/reference/get_abundance.html +++ b/reference/get_abundance.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_bins.html b/reference/get_bins.html index 8a35716..7742540 100644 --- a/reference/get_bins.html +++ b/reference/get_bins.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_count_table.html b/reference/get_count_table.html index 857af25..8daa60c 100644 --- a/reference/get_count_table.html +++ b/reference/get_count_table.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_cutoff.html b/reference/get_cutoff.html index fa29ab6..c037ed2 100644 --- a/reference/get_cutoff.html +++ b/reference/get_cutoff.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_distance_df.html b/reference/get_distance_df.html index c828c71..cda5d3d 100644 --- a/reference/get_distance_df.html +++ b/reference/get_distance_df.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/get_metrics.html b/reference/get_metrics.html index 5dbdc11..3c33613 100644 --- a/reference/get_metrics.html +++ b/reference/get_metrics.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/index.html b/reference/index.html index 15d35b7..92877d9 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,7 +7,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/read_count.html b/reference/read_count.html index c9586e3..a8af9df 100644 --- a/reference/read_count.html +++ b/reference/read_count.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/read_dist.html b/reference/read_dist.html index d5dcef6..a8c124a 100644 --- a/reference/read_dist.html +++ b/reference/read_dist.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/split_clusters_to_list.html b/reference/split_clusters_to_list.html index 3108e1f..2835155 100644 --- a/reference/split_clusters_to_list.html +++ b/reference/split_clusters_to_list.html @@ -11,7 +11,7 @@ clustur - 0.1 + 0.1.0 diff --git a/reference/validate_count_table.html b/reference/validate_count_table.html index 6ec5767..561b37f 100644 --- a/reference/validate_count_table.html +++ b/reference/validate_count_table.html @@ -9,7 +9,7 @@ clustur - 0.1 + 0.1.0 diff --git a/search.json b/search.json index 217bf46..42e4d92 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"http://www.schlosslab.org/clustur/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 clustur authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"clustur","text":"clustur developed similar mothur’s cluster function written C++. order cluster data, users need provide sparse phylip-formatted distance matrix. also need provide count table either comes mothur create R. objects built users can call cluster() function. currently support 5 methods: opticlust (default) furthest, nearest, weighted, average neighbor. opticlust method cluster() mothur’s default. speed methods implemented {clustur} mothur comparable; {clustur} may even faster! show create sparse matrix count table. count table, clustur can produce one , assume abundance sequence one cluster sequences distance matrix. output running clustur() includes typically provided mothur-formatted shared file.","code":""},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"starting-up","dir":"Articles","previous_headings":"","what":"Starting Up","title":"clustur","text":"official release CRAN can use standard install.packages() function: developmental version, can use install_github() function {devtools} package {clustur}’s functions make use random number generator, users strongly encouraged set seed.","code":"# install via cran install.packages(\"clustur\") # install via github devtools::install_github(\"SchlossLab/clustur\") library(clustur) set.seed(19760620)"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"read-count-files","dir":"Articles","previous_headings":"","what":"Read count files","title":"clustur","text":"clustur produce output using either sparse (default) full count table","code":"full_count_table <- read_count(example_path(\"amazon.full.count_table\")) sparse_count_table <- read_count(example_path(\"amazon.sparse.count_table\"))"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"read-distance-matrix-file","dir":"Articles","previous_headings":"","what":"Read distance matrix file","title":"clustur","text":"clustur read mothur’s column/sparse distance matrix Phylip-formatted distance matrix formats. return value distance_data memory address. want data frame version distances, can use get_distance_df(distance_data).","code":"column_distance <- read_dist(example_path(\"amazon_column.dist\"), full_count_table, cutoff = 0.03) phylip_distance <- read_dist(example_path(\"amazon_phylip.dist\"), full_count_table, cutoff = 0.03) get_distance_df(column_distance) #> FirstName SecondName Distance #> 1 U68638 U68618 0.020396 #> 2 U68638 U68620 0.020396 #> 3 U68638 U68658 0.027067 #> 4 U68618 U68620 0.000000 #> 5 U68618 U68658 0.022512 #> 6 U68620 U68658 0.022512 #> 7 U68641 U68667 0.000000 #> 8 U68641 U68673 0.018238 #> 9 U68667 U68673 0.018238 #> 10 U68636 U68631 0.006024 #> 11 U68680 U68615 0.003141 #> 12 U68679 U68663 0.020354 #> 13 U68679 U68665 0.017144 #> 14 U68679 U68688 0.009987 #> 15 U68665 U68663 0.012295 #> 16 U68665 U68688 0.008059 #> 17 U68663 U68688 0.020272 get_distance_df(phylip_distance) #> FirstName SecondName Distance #> 1 U68615 U68680 0.003141 #> 2 U68618 U68620 0.000000 #> 3 U68618 U68638 0.020396 #> 4 U68618 U68658 0.022512 #> 5 U68620 U68638 0.020396 #> 6 U68620 U68658 0.022512 #> 7 U68631 U68636 0.006024 #> 8 U68638 U68658 0.027067 #> 9 U68641 U68667 0.000000 #> 10 U68641 U68673 0.018238 #> 11 U68663 U68665 0.012295 #> 12 U68663 U68679 0.020354 #> 13 U68663 U68688 0.020272 #> 14 U68665 U68679 0.017144 #> 15 U68665 U68688 0.008059 #> 16 U68667 U68673 0.018238 #> 17 U68679 U68688 0.009987"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"clustering-the-data","dir":"Articles","previous_headings":"","what":"Clustering the data","title":"clustur","text":"default method clustering cluster “opticlust”","code":"cutoff <- 0.03 cluster_data <- cluster(column_distance, cutoff)"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"selecting-different-clustering-methods","dir":"Articles","previous_headings":"Clustering the data","what":"Selecting different clustering methods","title":"clustur","text":"","code":"cluster_data <- cluster(column_distance, cutoff, method = \"furthest\") cluster_data <- cluster(column_distance, cutoff, method = \"nearest\") cluster_data <- cluster(column_distance, cutoff, method = \"average\") cluster_data <- cluster(column_distance, cutoff, method = \"weighted\")"},{"path":[]},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"edit-this-paragraph-further","dir":"Articles","previous_headings":"Output data from clustering","what":"edit this paragraph further…","title":"clustur","text":"methods produce list object indicator cutoff used (label), well cluster composition (cluster) shared (abundance) data frames. clusters data frame shows OTU (Operation Taxonomic Unit) sequence assigned . abundance data frame contains columns indicating OTU sample identifiers abundance OTU sample. OptiClust method also includes metrics data frame, describe optimization value iteration fitting process; data clusters shared taken last iteration. clustur provides getter functions, get_label(), get_clusters(), get_shared(), get_metrics(), demonstrated .","code":"clusters <- cluster(column_distance, cutoff, method = \"opticlust\") get_cutoff(clusters) #> [1] 0.03 get_bins(clusters) #> feature bin #> 1 U68630 bin1 #> 2 U68595 bin2 #> 3 U68600 bin3 #> 4 U68591 bin4 #> 5 U68647 bin5 #> 6 U68661 bin6 #> 7 U68605 bin7 #> [ reached 'max' / getOption(\"max.print\") -- omitted 81 rows ] get_abundance(clusters) #> samples otu abundance #> 1 pasture otu1 0 #> 2 forest otu1 1 #> 3 pasture otu2 0 #> 4 forest otu2 1 #> 5 pasture otu3 0 #> [ reached 'max' / getOption(\"max.print\") -- omitted 171 rows ] get_metrics(clusters) #> $metrics #> label cutoff specificity ppv ttp f1score tn #> 1 0.030000 0.030000 1.000000 1.000000 17.000000 1.000000 4736.000000 #> mcc fn fp sensitivity npv fdr accuracy #> 1 1.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 #> #> $iteration_metrics #> iter time label num_otus cutoff tp tn fp fn sensitivity specificity ppv #> npv fdr accuracy mcc f1score #> [ reached 'max' / getOption(\"max.print\") -- omitted 3 rows ]"},{"path":"http://www.schlosslab.org/clustur/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Gregory Johnson. Author. Sarah Westcott. Author. Patrick Schloss. Author, maintainer, copyright holder.","code":""},{"path":"http://www.schlosslab.org/clustur/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Johnson G, Westcott S, Schloss P (2024). clustur: Clustering. R package version 0.1, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/.","code":"@Manual{, title = {clustur: Clustering}, author = {Gregory Johnson and Sarah Westcott and Patrick Schloss}, year = {2024}, note = {R package version 0.1, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, }"},{"path":"http://www.schlosslab.org/clustur/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Clustering","text":"clustur developed two main reasons: allow developers easily create pipelines mothur code R, give users powerful clustering algorithm mothur without download . clustur built using rcpp, benefits speed C++ usability R. Additionally, since clustur open source, developers can modify package needed. help us continue create high quality packages, allow everyone take advantage foundation already built.","code":""},{"path":"http://www.schlosslab.org/clustur/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Clustering","text":"official release CRAN can use standard install.packages() function: developmental version, can use install_github() function {devtools} package","code":"# install via cran install.packages(\"clustur\") library(clustur) # install via github devtools::install_github(\"SchlossLab/clustur\") library(clustur)"},{"path":"http://www.schlosslab.org/clustur/index.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting Started","title":"Clustering","text":"get started, look “Getting started” page.","code":""},{"path":"http://www.schlosslab.org/clustur/index.html","id":"contributions","dir":"","previous_headings":"","what":"Contributions","title":"Clustering","text":"feature request please visit issue page GitHub use feature tag. like contribute pull request welcomed!","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster entities together — cluster","title":"Cluster entities together — cluster","text":"Clusters entities represented distance matrix count table using one several algorithms outputs information composition abundance cluster","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster entities together — cluster","text":"","code":"cluster( distance_object, cutoff, method = \"opticlust\", feature_column_name_to = \"feature\", bin_column_name_to = \"bin\", random_seed = 123 )"},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster entities together — cluster","text":"distance_object distance object created using `read_dist()` function. cutoff cutoff want cluster towards. method method clustering performed: opticlust (default), feature_column_name_to Set name column cluster dataframe contains sequence names. bin_column_name_to Set name column cluster dataframe contains name group sequence names. furthest, nearest, average, weighted. random_seed random seed use, (default = 123).","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster entities together — cluster","text":"list `data.frames` contain abundance, clustering results. used `method = opticlust`, also return clustering performance metrics.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster entities together — cluster","text":"","code":"cutoff <- 0.03 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff) cluster_results <- cluster(distance_data, cutoff, method = \"opticlust\", feature_column_name_to = \"sequence\", bin_column_name_to = \"omu\") cluster_results <- cluster(distance_data, cutoff, method = \"furthest\") cluster_results <- cluster(distance_data, cutoff, method = \"nearest\") cluster_results <- cluster(distance_data, cutoff, method = \"average\") cluster_results <- cluster(distance_data, cutoff, method = \"weighted\")"},{"path":"http://www.schlosslab.org/clustur/reference/clustur-package.html","id":null,"dir":"Reference","previous_headings":"","what":"clustur: Clustering — clustur-package","title":"clustur: Clustering — clustur-package","text":"tool implements clustering algorithms mothur (Schloss PD et al. (2009) doi:10.1128/AEM.01541-09 ). clustur make use 'cluster' 'make.shared' command mothur. cluster command five different algorithms implemented: 'opticlust', 'furthest', 'nearest', 'average', 'weighted'. OptiClust optimized clustering method Operational Taxonomic Units, can learn , (Westcott SL, Schloss PD (2017) doi:10.1128/mspheredirect.00073-17 ). 'make.shared' command always applied end clustering command. functionality allows us generate create clustering abundance data efficiently.","code":""},{"path":[]},{"path":"http://www.schlosslab.org/clustur/reference/clustur-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"clustur: Clustering — clustur-package","text":"Maintainer: Patrick Schloss pschloss@umich.edu (ORCID) [copyright holder] Authors: Gregory Johnson grejoh@umich.edu (ORCID) Sarah Westcott swestcot@umich.edu","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Sparse Matrix — create_sparse_matrix","title":"Create Sparse Matrix — create_sparse_matrix","text":"Given list indexes, j indexes, distances values, can create sparse distance matrix . vector must size.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Sparse Matrix — create_sparse_matrix","text":"","code":"create_sparse_matrix(i_index, j_index, distances)"},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Sparse Matrix — create_sparse_matrix","text":"i_index list indexes, must numeric j_index list j indexes, must numeric distances list distance j index","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Sparse Matrix — create_sparse_matrix","text":"`dgTMatrix` `Matrix` library.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Sparse Matrix — create_sparse_matrix","text":"","code":"i_values <- as.integer(1:100) j_values <- as.integer(sample(1:100, 100, TRUE)) x_values <- as.numeric(runif(100, 0, 1)) s_matrix <- create_sparse_matrix(i_values, j_values, x_values)"},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Example Path — example_path","title":"Example Path — example_path","text":"function created helper function generate file paths internal data. use function want follow along example, interact data","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example Path — example_path","text":"","code":"example_path(file = NULL)"},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Example Path — example_path","text":"file file name data; leave NULL (default) get full list example files","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Example Path — example_path","text":"path file `character` vector `character` giving example filenames `fill = NULL`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example Path — example_path","text":"","code":"example_path(\"amazon_phylip.dist\") #> [1] \"/home/runner/work/_temp/Library/clustur/extdata/amazon_phylip.dist\" example_path() #> [1] \"amazon.full.count_table\" \"amazon.sparse.count_table\" #> [3] \"amazon_column.dist\" \"amazon_phylip.dist\""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Shared — get_abundance","title":"Get Shared — get_abundance","text":"GetShared returns generated abundance `data.frame` `cluster()` function","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Shared — get_abundance","text":"","code":"get_abundance(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Shared — get_abundance","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Shared — get_abundance","text":"shared data.frame","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Shared — get_abundance","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") shared <- get_abundance(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Clusters — get_bins","title":"Get Clusters — get_bins","text":"GetClusters returns `data.frame` generated clusters `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Clusters — get_bins","text":"","code":"get_bins(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Clusters — get_bins","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Clusters — get_bins","text":"created cluster `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Clusters — get_bins","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") clusters <- get_bins(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Count Table — get_count_table","title":"Get Count Table — get_count_table","text":"function returns count table used generate distance object.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Count Table — get_count_table","text":"","code":"get_count_table(distance_object)"},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Count Table — get_count_table","text":"distance_object output `read.dist()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Count Table — get_count_table","text":"count_table `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Count Table — get_count_table","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) count_table <- get_count_table(distance_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cutoff — get_cutoff","title":"Get Cutoff — get_cutoff","text":"Returns distance cutoff cluster object `cluster()` function","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cutoff — get_cutoff","text":"","code":"get_cutoff(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cutoff — get_cutoff","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Cutoff — get_cutoff","text":"cutoff value `dbl`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Cutoff — get_cutoff","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") cutoff <- get_cutoff(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Distance Data Frame — get_distance_df","title":"Get Distance Data Frame — get_distance_df","text":"function generate `data.frame` contains distances indexes.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Distance Data Frame — get_distance_df","text":"","code":"get_distance_df(distance_object)"},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Distance Data Frame — get_distance_df","text":"distance_object output `read.dist()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Distance Data Frame — get_distance_df","text":"distance `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Distance Data Frame — get_distance_df","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) count_table <- get_count_table(distance_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Metrics — get_metrics","title":"Get Metrics — get_metrics","text":"GetMetrics returns generated metrics `data.frame` `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Metrics — get_metrics","text":"","code":"get_metrics(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Metrics — get_metrics","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Metrics — get_metrics","text":"list metric data.frames","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Metrics — get_metrics","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") list_of_metrics <- get_metrics(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":null,"dir":"Reference","previous_headings":"","what":"Read count table — read_count","title":"Read count table — read_count","text":"function read return count table. can take sparse full count tables.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read count table — read_count","text":"","code":"read_count(count_table_path)"},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read count table — read_count","text":"count_table_path file path count table.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read count table — read_count","text":"count table `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read count table — read_count","text":"","code":"count_table <- read_count(example_path(\"amazon.full.count_table\"))"},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Read distance matrices — read_dist","title":"Read distance matrices — read_dist","text":"Read distances file formatted three columns row, column, distance sparse, square matrix phylip-formatted distance matrix.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read distance matrices — read_dist","text":"","code":"read_dist(distance_file, count_table, cutoff, is_similarity_matrix = FALSE)"},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read distance matrices — read_dist","text":"distance_file Either phylip column distance file, sparse matrix. function detect format . count_table table names given abundance per group. Can mothur's sparse full format. function detect format . cutoff value wish use cutoff clustering. is_similarity_matrix using similarity matrix (default) distance matrix?","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read distance matrices — read_dist","text":"distance `externalptr` object contains distance information. Can accessed using `get_distance_df()`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read distance matrices — read_dist","text":"","code":"i_values <- as.integer(1:100) j_values <- as.integer(sample(1:100, 100, TRUE)) x_values <- as.numeric(runif(100, 0, 1)) s_matrix <- create_sparse_matrix(i_values, j_values, x_values) sparse_count <- data.frame( Representative_Sequence = 1:100, total = rep(1, times = 100)) column_path <- example_path(\"amazon_column.dist\") phylip_path <- example_path(\"amazon_phylip.dist\") count_table <- read_count(example_path(\"amazon.full.count_table\")) data_column <- read_dist(column_path, count_table, 0.03) data_phylip <- read_dist(phylip_path, count_table, 0.03) data_sparse <- read_dist(s_matrix, sparse_count, 0.03)"},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Split Clusters to List — split_clusters_to_list","title":"Split Clusters to List — split_clusters_to_list","text":"`split_clusters_to_list()` extract clusters cluster generated `data.frame`. turn clusters list. allows users easily visualize data.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split Clusters to List — split_clusters_to_list","text":"","code":"split_clusters_to_list(cluster)"},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split Clusters to List — split_clusters_to_list","text":"cluster output generated `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split Clusters to List — split_clusters_to_list","text":"named `list` clusters.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split Clusters to List — split_clusters_to_list","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) cluster_results <- cluster(distance_data, cutoff, method = \"opticlust\") cluster_list <- split_clusters_to_list(cluster_results)"},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate Count Table — validate_count_table","title":"Validate Count Table — validate_count_table","text":"count table already valid nothing change, otherwise add new group count table file.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate Count Table — validate_count_table","text":"","code":"validate_count_table(count_table_df)"},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate Count Table — validate_count_table","text":"count_table_df count table `data.frame` object.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate Count Table — validate_count_table","text":"validated count table `data.frame`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate Count Table — validate_count_table","text":"Determines whether user supplied count table valid","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate Count Table — validate_count_table","text":"","code":"count_table <- read.delim(example_path(\"amazon.full.count_table\")) count_table_valid <- validate_count_table(count_table)"},{"path":"http://www.schlosslab.org/clustur/news/index.html","id":"clustur-01","dir":"Changelog","previous_headings":"","what":"clustur 0.1","title":"clustur 0.1","text":"Initial CRAN submission.","code":""}] +[{"path":"http://www.schlosslab.org/clustur/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 clustur authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"clustur","text":"clustur developed similar mothur’s cluster function written C++. order cluster data, users need provide sparse phylip-formatted distance matrix. also need provide count table either comes mothur create R. objects built users can call cluster() function. currently support 5 methods: opticlust (default) furthest, nearest, weighted, average neighbor. opticlust method cluster() mothur’s default. speed methods implemented {clustur} mothur comparable; {clustur} may even faster! show create sparse matrix count table. count table, clustur can produce one , assume abundance sequence one cluster sequences distance matrix. output running clustur() includes typically provided mothur-formatted shared file.","code":""},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"starting-up","dir":"Articles","previous_headings":"","what":"Starting Up","title":"clustur","text":"official release CRAN can use standard install.packages() function: developmental version, can use install_github() function {devtools} package {clustur}’s functions make use random number generator, users strongly encouraged set seed.","code":"# install via cran install.packages(\"clustur\") # install via github devtools::install_github(\"SchlossLab/clustur\") library(clustur) set.seed(19760620)"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"read-count-files","dir":"Articles","previous_headings":"","what":"Read count files","title":"clustur","text":"clustur produce output using either sparse (default) full count table","code":"full_count_table <- read_count(example_path(\"amazon.full.count_table\")) sparse_count_table <- read_count(example_path(\"amazon.sparse.count_table\"))"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"read-distance-matrix-file","dir":"Articles","previous_headings":"","what":"Read distance matrix file","title":"clustur","text":"clustur read mothur’s column/sparse distance matrix Phylip-formatted distance matrix formats. return value distance_data memory address. want data frame version distances, can use get_distance_df(distance_data).","code":"column_distance <- read_dist(example_path(\"amazon_column.dist\"), full_count_table, cutoff = 0.03) phylip_distance <- read_dist(example_path(\"amazon_phylip.dist\"), full_count_table, cutoff = 0.03) get_distance_df(column_distance) #> FirstName SecondName Distance #> 1 U68638 U68618 0.020396 #> 2 U68638 U68620 0.020396 #> 3 U68638 U68658 0.027067 #> 4 U68618 U68620 0.000000 #> 5 U68618 U68658 0.022512 #> 6 U68620 U68658 0.022512 #> 7 U68641 U68667 0.000000 #> 8 U68641 U68673 0.018238 #> 9 U68667 U68673 0.018238 #> 10 U68636 U68631 0.006024 #> 11 U68680 U68615 0.003141 #> 12 U68679 U68663 0.020354 #> 13 U68679 U68665 0.017144 #> 14 U68679 U68688 0.009987 #> 15 U68665 U68663 0.012295 #> 16 U68665 U68688 0.008059 #> 17 U68663 U68688 0.020272 get_distance_df(phylip_distance) #> FirstName SecondName Distance #> 1 U68615 U68680 0.003141 #> 2 U68618 U68620 0.000000 #> 3 U68618 U68638 0.020396 #> 4 U68618 U68658 0.022512 #> 5 U68620 U68638 0.020396 #> 6 U68620 U68658 0.022512 #> 7 U68631 U68636 0.006024 #> 8 U68638 U68658 0.027067 #> 9 U68641 U68667 0.000000 #> 10 U68641 U68673 0.018238 #> 11 U68663 U68665 0.012295 #> 12 U68663 U68679 0.020354 #> 13 U68663 U68688 0.020272 #> 14 U68665 U68679 0.017144 #> 15 U68665 U68688 0.008059 #> 16 U68667 U68673 0.018238 #> 17 U68679 U68688 0.009987"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"clustering-the-data","dir":"Articles","previous_headings":"","what":"Clustering the data","title":"clustur","text":"default method clustering cluster “opticlust”","code":"cutoff <- 0.03 cluster_data <- cluster(column_distance, cutoff)"},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"selecting-different-clustering-methods","dir":"Articles","previous_headings":"Clustering the data","what":"Selecting different clustering methods","title":"clustur","text":"","code":"cluster_data <- cluster(column_distance, cutoff, method = \"furthest\") cluster_data <- cluster(column_distance, cutoff, method = \"nearest\") cluster_data <- cluster(column_distance, cutoff, method = \"average\") cluster_data <- cluster(column_distance, cutoff, method = \"weighted\")"},{"path":[]},{"path":"http://www.schlosslab.org/clustur/articles/clustur.html","id":"edit-this-paragraph-further","dir":"Articles","previous_headings":"Output data from clustering","what":"edit this paragraph further…","title":"clustur","text":"methods produce list object indicator cutoff used (label), well cluster composition (cluster) shared (abundance) data frames. clusters data frame shows OTU (Operation Taxonomic Unit) sequence assigned . abundance data frame contains columns indicating OTU sample identifiers abundance OTU sample. OptiClust method also includes metrics data frame, describe optimization value iteration fitting process; data clusters shared taken last iteration. clustur provides getter functions, get_label(), get_clusters(), get_shared(), get_metrics(), demonstrated .","code":"clusters <- cluster(column_distance, cutoff, method = \"opticlust\") get_cutoff(clusters) #> [1] 0.03 get_bins(clusters) #> feature bin #> 1 U68630 bin1 #> 2 U68595 bin2 #> 3 U68600 bin3 #> 4 U68591 bin4 #> 5 U68647 bin5 #> 6 U68661 bin6 #> 7 U68605 bin7 #> [ reached 'max' / getOption(\"max.print\") -- omitted 81 rows ] get_abundance(clusters) #> samples otu abundance #> 1 pasture otu1 0 #> 2 forest otu1 1 #> 3 pasture otu2 0 #> 4 forest otu2 1 #> 5 pasture otu3 0 #> [ reached 'max' / getOption(\"max.print\") -- omitted 171 rows ] get_metrics(clusters) #> $metrics #> label cutoff specificity ppv ttp f1score tn #> 1 0.030000 0.030000 1.000000 1.000000 17.000000 1.000000 4736.000000 #> mcc fn fp sensitivity npv fdr accuracy #> 1 1.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 #> #> $iteration_metrics #> iter time label num_otus cutoff tp tn fp fn sensitivity specificity ppv #> npv fdr accuracy mcc f1score #> [ reached 'max' / getOption(\"max.print\") -- omitted 3 rows ]"},{"path":"http://www.schlosslab.org/clustur/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Gregory Johnson. Author. Sarah Westcott. Author. Patrick Schloss. Author, maintainer, copyright holder.","code":""},{"path":"http://www.schlosslab.org/clustur/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Johnson G, Westcott S, Schloss P (2024). clustur: Clustering. R package version 0.1.0, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/.","code":"@Manual{, title = {clustur: Clustering}, author = {Gregory Johnson and Sarah Westcott and Patrick Schloss}, year = {2024}, note = {R package version 0.1.0, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, }"},{"path":"http://www.schlosslab.org/clustur/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Clustering","text":"clustur developed two main reasons: allow developers easily create pipelines mothur code R, give users powerful clustering algorithm mothur without download . clustur built using rcpp, benefits speed C++ usability R. Additionally, since clustur open source, developers can modify package needed. help us continue create high quality packages, allow everyone take advantage foundation already built.","code":""},{"path":"http://www.schlosslab.org/clustur/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Clustering","text":"official release CRAN can use standard install.packages() function: developmental version, can use install_github() function {devtools} package","code":"# install via cran install.packages(\"clustur\") library(clustur) # install via github devtools::install_github(\"SchlossLab/clustur\") library(clustur)"},{"path":"http://www.schlosslab.org/clustur/index.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting Started","title":"Clustering","text":"get started, look “Getting started” page.","code":""},{"path":"http://www.schlosslab.org/clustur/index.html","id":"contributions","dir":"","previous_headings":"","what":"Contributions","title":"Clustering","text":"feature request please visit issue page GitHub use feature tag. like contribute pull request welcomed!","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":null,"dir":"Reference","previous_headings":"","what":"Cluster entities together — cluster","title":"Cluster entities together — cluster","text":"Clusters entities represented distance matrix count table using one several algorithms outputs information composition abundance cluster","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cluster entities together — cluster","text":"","code":"cluster( distance_object, cutoff, method = \"opticlust\", feature_column_name_to = \"feature\", bin_column_name_to = \"bin\", random_seed = 123 )"},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cluster entities together — cluster","text":"distance_object distance object created using `read_dist()` function. cutoff cutoff want cluster towards. method method clustering performed: opticlust (default), feature_column_name_to Set name column cluster dataframe contains sequence names. bin_column_name_to Set name column cluster dataframe contains name group sequence names. furthest, nearest, average, weighted. random_seed random seed use, (default = 123).","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cluster entities together — cluster","text":"list `data.frames` contain abundance, clustering results. used `method = opticlust`, also return clustering performance metrics.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/cluster.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cluster entities together — cluster","text":"","code":"cutoff <- 0.03 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff) cluster_results <- cluster(distance_data, cutoff, method = \"opticlust\", feature_column_name_to = \"sequence\", bin_column_name_to = \"omu\") cluster_results <- cluster(distance_data, cutoff, method = \"furthest\") cluster_results <- cluster(distance_data, cutoff, method = \"nearest\") cluster_results <- cluster(distance_data, cutoff, method = \"average\") cluster_results <- cluster(distance_data, cutoff, method = \"weighted\")"},{"path":"http://www.schlosslab.org/clustur/reference/clustur-package.html","id":null,"dir":"Reference","previous_headings":"","what":"clustur: Clustering — clustur-package","title":"clustur: Clustering — clustur-package","text":"tool implements clustering algorithms mothur (Schloss PD et al. (2009) doi:10.1128/AEM.01541-09 ). clustur make use 'cluster' 'make.shared' command mothur. cluster command five different algorithms implemented: 'opticlust', 'furthest', 'nearest', 'average', 'weighted'. OptiClust optimized clustering method Operational Taxonomic Units, can learn , (Westcott SL, Schloss PD (2017) doi:10.1128/mspheredirect.00073-17 ). 'make.shared' command always applied end clustering command. functionality allows us generate create clustering abundance data efficiently.","code":""},{"path":[]},{"path":"http://www.schlosslab.org/clustur/reference/clustur-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"clustur: Clustering — clustur-package","text":"Maintainer: Patrick Schloss pschloss@umich.edu (ORCID) [copyright holder] Authors: Gregory Johnson grejoh@umich.edu (ORCID) Sarah Westcott swestcot@umich.edu","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Sparse Matrix — create_sparse_matrix","title":"Create Sparse Matrix — create_sparse_matrix","text":"Given list indexes, j indexes, distances values, can create sparse distance matrix . vector must size.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Sparse Matrix — create_sparse_matrix","text":"","code":"create_sparse_matrix(i_index, j_index, distances)"},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Sparse Matrix — create_sparse_matrix","text":"i_index list indexes, must numeric j_index list j indexes, must numeric distances list distance j index","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Sparse Matrix — create_sparse_matrix","text":"`dgTMatrix` `Matrix` library.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/create_sparse_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Sparse Matrix — create_sparse_matrix","text":"","code":"i_values <- as.integer(1:100) j_values <- as.integer(sample(1:100, 100, TRUE)) x_values <- as.numeric(runif(100, 0, 1)) s_matrix <- create_sparse_matrix(i_values, j_values, x_values)"},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Example Path — example_path","title":"Example Path — example_path","text":"function created helper function generate file paths internal data. use function want follow along example, interact data","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example Path — example_path","text":"","code":"example_path(file = NULL)"},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Example Path — example_path","text":"file file name data; leave NULL (default) get full list example files","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Example Path — example_path","text":"path file `character` vector `character` giving example filenames `fill = NULL`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/example_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example Path — example_path","text":"","code":"example_path(\"amazon_phylip.dist\") #> [1] \"/home/runner/work/_temp/Library/clustur/extdata/amazon_phylip.dist\" example_path() #> [1] \"amazon.full.count_table\" \"amazon.sparse.count_table\" #> [3] \"amazon_column.dist\" \"amazon_phylip.dist\""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Shared — get_abundance","title":"Get Shared — get_abundance","text":"GetShared returns generated abundance `data.frame` `cluster()` function","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Shared — get_abundance","text":"","code":"get_abundance(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Shared — get_abundance","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Shared — get_abundance","text":"shared data.frame","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_abundance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Shared — get_abundance","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") shared <- get_abundance(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Clusters — get_bins","title":"Get Clusters — get_bins","text":"GetClusters returns `data.frame` generated clusters `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Clusters — get_bins","text":"","code":"get_bins(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Clusters — get_bins","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Clusters — get_bins","text":"created cluster `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_bins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Clusters — get_bins","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") clusters <- get_bins(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Count Table — get_count_table","title":"Get Count Table — get_count_table","text":"function returns count table used generate distance object.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Count Table — get_count_table","text":"","code":"get_count_table(distance_object)"},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Count Table — get_count_table","text":"distance_object output `read.dist()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Count Table — get_count_table","text":"count_table `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_count_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Count Table — get_count_table","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) count_table <- get_count_table(distance_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Cutoff — get_cutoff","title":"Get Cutoff — get_cutoff","text":"Returns distance cutoff cluster object `cluster()` function","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Cutoff — get_cutoff","text":"","code":"get_cutoff(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Cutoff — get_cutoff","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Cutoff — get_cutoff","text":"cutoff value `dbl`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_cutoff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Cutoff — get_cutoff","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") cutoff <- get_cutoff(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Distance Data Frame — get_distance_df","title":"Get Distance Data Frame — get_distance_df","text":"function generate `data.frame` contains distances indexes.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Distance Data Frame — get_distance_df","text":"","code":"get_distance_df(distance_object)"},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Distance Data Frame — get_distance_df","text":"distance_object output `read.dist()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Distance Data Frame — get_distance_df","text":"distance `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_distance_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Distance Data Frame — get_distance_df","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) count_table <- get_count_table(distance_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Metrics — get_metrics","title":"Get Metrics — get_metrics","text":"GetMetrics returns generated metrics `data.frame` `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Metrics — get_metrics","text":"","code":"get_metrics(cluster_data)"},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Metrics — get_metrics","text":"cluster_data output `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Metrics — get_metrics","text":"list metric data.frames","code":""},{"path":"http://www.schlosslab.org/clustur/reference/get_metrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Metrics — get_metrics","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) df_clusters <- cluster(distance_data, cutoff, method = \"opticlust\") list_of_metrics <- get_metrics(df_clusters)"},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":null,"dir":"Reference","previous_headings":"","what":"Read count table — read_count","title":"Read count table — read_count","text":"function read return count table. can take sparse full count tables.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read count table — read_count","text":"","code":"read_count(count_table_path)"},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read count table — read_count","text":"count_table_path file path count table.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read count table — read_count","text":"count table `data.frame`.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_count.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read count table — read_count","text":"","code":"count_table <- read_count(example_path(\"amazon.full.count_table\"))"},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":null,"dir":"Reference","previous_headings":"","what":"Read distance matrices — read_dist","title":"Read distance matrices — read_dist","text":"Read distances file formatted three columns row, column, distance sparse, square matrix phylip-formatted distance matrix.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read distance matrices — read_dist","text":"","code":"read_dist(distance_file, count_table, cutoff, is_similarity_matrix = FALSE)"},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read distance matrices — read_dist","text":"distance_file Either phylip column distance file, sparse matrix. function detect format . count_table table names given abundance per group. Can mothur's sparse full format. function detect format . cutoff value wish use cutoff clustering. is_similarity_matrix using similarity matrix (default) distance matrix?","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read distance matrices — read_dist","text":"distance `externalptr` object contains distance information. Can accessed using `get_distance_df()`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/read_dist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read distance matrices — read_dist","text":"","code":"i_values <- as.integer(1:100) j_values <- as.integer(sample(1:100, 100, TRUE)) x_values <- as.numeric(runif(100, 0, 1)) s_matrix <- create_sparse_matrix(i_values, j_values, x_values) sparse_count <- data.frame( Representative_Sequence = 1:100, total = rep(1, times = 100)) column_path <- example_path(\"amazon_column.dist\") phylip_path <- example_path(\"amazon_phylip.dist\") count_table <- read_count(example_path(\"amazon.full.count_table\")) data_column <- read_dist(column_path, count_table, 0.03) data_phylip <- read_dist(phylip_path, count_table, 0.03) data_sparse <- read_dist(s_matrix, sparse_count, 0.03)"},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Split Clusters to List — split_clusters_to_list","title":"Split Clusters to List — split_clusters_to_list","text":"`split_clusters_to_list()` extract clusters cluster generated `data.frame`. turn clusters list. allows users easily visualize data.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split Clusters to List — split_clusters_to_list","text":"","code":"split_clusters_to_list(cluster)"},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split Clusters to List — split_clusters_to_list","text":"cluster output generated `cluster()` function.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split Clusters to List — split_clusters_to_list","text":"named `list` clusters.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/split_clusters_to_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split Clusters to List — split_clusters_to_list","text":"","code":"cutoff <- 0.2 count_table <- read_count(example_path(\"amazon.full.count_table\")) distance_data <- read_dist(example_path(\"amazon_column.dist\"), count_table, cutoff, FALSE) cluster_results <- cluster(distance_data, cutoff, method = \"opticlust\") cluster_list <- split_clusters_to_list(cluster_results)"},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate Count Table — validate_count_table","title":"Validate Count Table — validate_count_table","text":"count table already valid nothing change, otherwise add new group count table file.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate Count Table — validate_count_table","text":"","code":"validate_count_table(count_table_df)"},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate Count Table — validate_count_table","text":"count_table_df count table `data.frame` object.","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate Count Table — validate_count_table","text":"validated count table `data.frame`","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate Count Table — validate_count_table","text":"Determines whether user supplied count table valid","code":""},{"path":"http://www.schlosslab.org/clustur/reference/validate_count_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate Count Table — validate_count_table","text":"","code":"count_table <- read.delim(example_path(\"amazon.full.count_table\")) count_table_valid <- validate_count_table(count_table)"},{"path":"http://www.schlosslab.org/clustur/news/index.html","id":"clustur-01","dir":"Changelog","previous_headings":"","what":"clustur 0.1","title":"clustur 0.1","text":"Initial CRAN submission.","code":""}]
Johnson G, Westcott S, Schloss P (2024). clustur: Clustering. -R package version 0.1, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/. +R package version 0.1.0, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/.
@Manual{, title = {clustur: Clustering}, author = {Gregory Johnson and Sarah Westcott and Patrick Schloss}, year = {2024}, - note = {R package version 0.1, https://github.com/SchlossLab/clustur}, + note = {R package version 0.1.0, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, }