From 27b2b788a2c3276572b18c6a2beb25ee13d7c4ea Mon Sep 17 00:00:00 2001 From: Mathieu Date: Wed, 16 Feb 2022 08:49:45 +0100 Subject: [PATCH 1/3] core/windows.cpp, js/tools.js, doc/: Pielou's evenness see #4949 --- algo/core/windows.cpp | 2 +- browser/js/tools.js | 2 +- doc/user.md | 2 +- doc/vidjil-algo.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/algo/core/windows.cpp b/algo/core/windows.cpp index d1c673065..6fb0bc8ad 100644 --- a/algo/core/windows.cpp +++ b/algo/core/windows.cpp @@ -266,7 +266,7 @@ json WindowsStorage::computeDiversity(map nb_segmented) { // Shannon's diversity jsonDiversity["index_H_entropy"][code] = kv.second; - // Shannon's equitability + // Pielou's evenness J' (also known as Shannon's equitability) double nb_seg_nb_seg_m1 = nb_segmented[code] * (nb_segmented[code] - 1); jsonDiversity["index_E_equitability"][code] = index_H_entropy[code] / log(nb_segmented[code]) ; diff --git a/browser/js/tools.js b/browser/js/tools.js index 02a348204..8c0a15ee3 100644 --- a/browser/js/tools.js +++ b/browser/js/tools.js @@ -941,7 +941,7 @@ function download_csv(csv, filename) { function translate_key_diversity(key_diversity){ var table = { "index_H_entropy" : "Shannon's diversity", - "index_E_equitability" : "Shannon's equitability", + "index_E_equitability" : "Pielou's evenness", "index_Ds_diversity" : "Simpson's diversity" } return table[key_diversity] diff --git a/doc/user.md b/doc/user.md index 2d44fc536..aadfa07e3 100644 --- a/doc/user.md +++ b/doc/user.md @@ -775,7 +775,7 @@ analyzed reads, including the hidden clonotypes. Several indices are computed on the full list of clonotypes to assess the diversity and overlap of sample(s): - On one sample, [diversity indices](https://en.wikipedia.org/wiki/Diversity_index) such as - Shannon's diversity, Shannon's equitability and Simpson's diversity, as computed by [vijdil-algo](vidjil-algo.md#diversity-measures). + Shannon's diversity, Pielou's evenness and Simpson's diversity, as computed by [vijdil-algo](vidjil-algo.md#diversity-measures). Some of these indices have values between 0 (no diversity, one clonotype clusters all analyzed reads) and 1 (full diversity, each analyzed read belongs to a different clonotype). diff --git a/doc/vidjil-algo.md b/doc/vidjil-algo.md index a58123b64..96af1f728 100644 --- a/doc/vidjil-algo.md +++ b/doc/vidjil-algo.md @@ -679,7 +679,7 @@ Several [diversity indices](https://en.wikipedia.org/wiki/Diversity_index) are r for each germline/locus as well as for the entire data: - H (`index_H_entropy`): Shannon's diversity - - E (`index_E_equitability`): Shannon's equitability + - E (`index_E_equitability`): [Pielou's evenness J'](https://en.wikipedia.org/wiki/Species_evenness) (also known as Shannon's equitability) - Ds (`index_Ds_diversity`): Simpson's diversity E ans Ds values are between 0 (no diversity, one clone clusters all analyzed reads) -- GitLab From de309d8d5c092ab70eb256522327037a1703d725 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Wed, 16 Feb 2022 08:51:54 +0100 Subject: [PATCH 2/3] tests: update close #4949 --- browser/test/QUnit/testFiles/model_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/test/QUnit/testFiles/model_test.js b/browser/test/QUnit/testFiles/model_test.js index 153c0b8f8..edeb4d62b 100644 --- a/browser/test/QUnit/testFiles/model_test.js +++ b/browser/test/QUnit/testFiles/model_test.js @@ -752,7 +752,7 @@ QUnit.test("getPointHtmlInfo", function(assert) { html_info = m.getPointHtmlInfo(1) // each diversity indices has header assert.includes(html_info, "Shannon's diversity") - assert.includes(html_info, "Shannon's equitability") + assert.includes(html_info, "Pielou's evenness") assert.includes(html_info, "Simpson's diversity") // each present locus id visible assert.includes(html_info, 'Simpson\'s diversity x all') -- GitLab From 19c7712076d3692ac8fa6e538ae5fbf863afd6cf Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 18 Feb 2022 16:47:21 +0100 Subject: [PATCH 3/3] doc/user.md: diversity indices, more details and links --- doc/user.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/user.md b/doc/user.md index aadfa07e3..b3fe52192 100644 --- a/doc/user.md +++ b/doc/user.md @@ -774,16 +774,20 @@ analyzed reads, including the hidden clonotypes. Several indices are computed on the full list of clonotypes to assess the diversity and overlap of sample(s): -- On one sample, [diversity indices](https://en.wikipedia.org/wiki/Diversity_index) such as - Shannon's diversity, Pielou's evenness and Simpson's diversity, as computed by [vijdil-algo](vidjil-algo.md#diversity-measures). - Some of these indices have values between 0 (no diversity, one clonotype clusters all analyzed reads) +- On one sample, *diversity indices* such as + [Shannon's diversity](https://en.wikipedia.org/wiki/Diversity_index#Shannon_index), + [Pielou's evenness](https://en.wikipedia.org/wiki/Species_evenness), + and [Simpson's diversity](https://en.wikipedia.org/wiki/Diversity_index#Simpson_index), + as computed by [vijdil-algo](vidjil-algo.md#diversity-measures). + Pielou's evenness and Simpson's diversity have values between 0 + (no diversity, one clonotype clusters all analyzed reads) and 1 (full diversity, each analyzed read belongs to a different clonotype). - On several samples, overlap indexes such as [Morisita's overlap index](https://en.wikipedia.org/wiki/Morisita%27s_overlap_index) having values between 0 (no overlap between the two samples) and 1 (full overlap, clonotypes in the same proportion in both samples). -Some of these indices are currently shown on the sample information panel (“🛈” next to the sample name in the info panel). +Some of these indices are shown on the sample information panel (“🛈” next to the sample name in the info panel). Contact us if you have other needs. ## Exporting the full list of clonotypes -- GitLab