From 8802dcf23e0467ff81fe58d27dc8b4a2857e5058 Mon Sep 17 00:00:00 2001 From: GregJohnsonJr <31873199+GregJohnsonJr@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:55:31 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20SchlossL?= =?UTF-8?q?ab/clustur@cb46070044cae3446ff22950f9aaa45396c5866e=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- LICENSE-text.html | 2 +- LICENSE.html | 2 +- articles/clustur.html | 2 +- articles/index.html | 2 +- authors.html | 6 +++--- index.html | 2 +- news/index.html | 2 +- pkgdown.yml | 2 +- reference/cluster.html | 2 +- reference/clustur-package.html | 2 +- reference/create_sparse_matrix.html | 2 +- reference/example_path.html | 2 +- reference/get_abundance.html | 2 +- reference/get_bins.html | 2 +- reference/get_count_table.html | 2 +- reference/get_cutoff.html | 2 +- reference/get_distance_df.html | 2 +- reference/get_metrics.html | 2 +- reference/index.html | 2 +- reference/read_count.html | 2 +- reference/read_dist.html | 2 +- reference/split_clusters_to_list.html | 2 +- reference/validate_count_table.html | 2 +- search.json | 2 +- 25 files changed, 27 insertions(+), 27 deletions(-) diff --git a/404.html b/404.html index ba1e6aa..72774e1 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/LICENSE-text.html b/LICENSE-text.html index dee4504..8485f26 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/LICENSE.html b/LICENSE.html index 3c358d2..6646a75 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/articles/clustur.html b/articles/clustur.html index 37c3914..a92a8aa 100644 --- a/articles/clustur.html +++ b/articles/clustur.html @@ -20,7 +20,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/articles/index.html b/articles/index.html index a7294e9..7dca807 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/authors.html b/authors.html index 46d016a..41312fb 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 @@ -61,13 +61,13 @@ Citation 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/. +R package version 0.1.1, 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.0, https://github.com/SchlossLab/clustur}, + note = {R package version 0.1.1, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, } diff --git a/index.html b/index.html index 3b02304..b1b55ac 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/news/index.html b/news/index.html index 322fc1d..03317e9 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/pkgdown.yml b/pkgdown.yml index cecfd86..22d8ad9 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-20T19:10Z +last_built: 2024-11-25T19:55Z 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 858d18d..b30c94e 100644 --- a/reference/cluster.html +++ b/reference/cluster.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/clustur-package.html b/reference/clustur-package.html index c4b73a6..c19e340 100644 --- a/reference/clustur-package.html +++ b/reference/clustur-package.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/create_sparse_matrix.html b/reference/create_sparse_matrix.html index 9a97994..94269e3 100644 --- a/reference/create_sparse_matrix.html +++ b/reference/create_sparse_matrix.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/example_path.html b/reference/example_path.html index 81c4bf3..5e8c140 100644 --- a/reference/example_path.html +++ b/reference/example_path.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_abundance.html b/reference/get_abundance.html index 89ac66f..1178418 100644 --- a/reference/get_abundance.html +++ b/reference/get_abundance.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_bins.html b/reference/get_bins.html index 8283bcf..571518c 100644 --- a/reference/get_bins.html +++ b/reference/get_bins.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_count_table.html b/reference/get_count_table.html index b486a78..8581f46 100644 --- a/reference/get_count_table.html +++ b/reference/get_count_table.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_cutoff.html b/reference/get_cutoff.html index 409cb0d..a592c3d 100644 --- a/reference/get_cutoff.html +++ b/reference/get_cutoff.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_distance_df.html b/reference/get_distance_df.html index e7345d8..4edbf86 100644 --- a/reference/get_distance_df.html +++ b/reference/get_distance_df.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/get_metrics.html b/reference/get_metrics.html index e8064e8..d5763d6 100644 --- a/reference/get_metrics.html +++ b/reference/get_metrics.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/index.html b/reference/index.html index 4893dd9..97479f7 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,7 +7,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/read_count.html b/reference/read_count.html index d84fa7f..bf97cc0 100644 --- a/reference/read_count.html +++ b/reference/read_count.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/read_dist.html b/reference/read_dist.html index 06466d1..097e8c1 100644 --- a/reference/read_dist.html +++ b/reference/read_dist.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/split_clusters_to_list.html b/reference/split_clusters_to_list.html index 6b8be51..81b4205 100644 --- a/reference/split_clusters_to_list.html +++ b/reference/split_clusters_to_list.html @@ -11,7 +11,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/reference/validate_count_table.html b/reference/validate_count_table.html index 89f72a6..e879f3c 100644 --- a/reference/validate_count_table.html +++ b/reference/validate_count_table.html @@ -9,7 +9,7 @@ clustur - 0.1.0 + 0.1.1 diff --git a/search.json b/search.json index b96dcd8..b8f9fc7 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.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), furthest, nearest, average, weighted. 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. 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() function 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.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.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), furthest, nearest, average, weighted. 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. 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() function 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.0, https://github.com/SchlossLab/clustur, http://www.schlosslab.org/clustur/. +R package version 0.1.1, 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.0, https://github.com/SchlossLab/clustur}, + note = {R package version 0.1.1, https://github.com/SchlossLab/clustur}, url = {http://www.schlosslab.org/clustur/}, }