Skip to content

Commit

Permalink
Refine Tajima D policy help text and order
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed May 31, 2024
1 parent 3806574 commit a879716
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions src/commands/analyze/diversity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@ void setup_diversity( CLI::App& app )
// );
// options->no_nan_windows.option->group( "Settings" );

// PoPoolation output format
options->popoolation_format.option = sub->add_flag(
"--popoolation-format",
options->popoolation_format.value,
"If set, instead of writing one output table for all measures and all samples, "
"write the results in separate files for each sample and for each measure of "
"Theta Pi, Theta Watterson, and Tajima's D, following the format of PoPoolation."
)->group( "Settings" );

// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
Expand All @@ -126,6 +117,15 @@ void setup_diversity( CLI::App& app )
auto sep_opt = options->table_output.add_separator_char_opt_to_app( sub );
auto nan_opt = options->table_output.add_na_entry_opt_to_app( sub );

// PoPoolation output format
options->popoolation_format.option = sub->add_flag(
"--popoolation-format",
options->popoolation_format.value,
"If set, instead of writing one output table for all measures and all samples, "
"write the results in separate files for each sample and for each measure of "
"Theta Pi, Theta Watterson, and Tajima's D, following the format of PoPoolation."
)->group( "Formatting" );

// Exclude separator char option and na entry in PoPoolation compatibility mode,
// as we have to use their values in that case.
sep_opt->excludes( options->popoolation_format.option );
Expand Down
10 changes: 5 additions & 5 deletions src/options/diversity_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ void DiversityProcessorOptions::add_diversity_processor_opts_to_app(
"With pool seq data, there is no simple way to obtain a statistic that is numerically "
"comparable to the classic Tajima's D with individual data. Hence, all of the below are "
"simplicications that introduce some bias."
"\n(1) Empirical minimum read depth: Use the lowest empirical read depth found in each window, "
"\n(1) `empirical-min-read-depth`: Use the lowest empirical read depth found in each window, "
"and the pool size, to compute the expected number of individuals sequenced. "
"This is a conservative estimator that we recommend by default."
"\n(2) User-provided minimum read depth: Same as (1), but use the "
"\n(2) `provided-min-read-depth`: Same as (1), but use the user-provided "
"`--filter-sample-min-read-depth` instead of the empirical minum read depth. "
"This is what PoPoolation uses."
"\n(3) PoPoolation bugs: Same as (2), but additionally re-introduce their bugs. "
"\n(3) `popoolation-bugs`: Same as (2), but additionally re-introduce their bugs. "
"We offer this for comparability with PoPoolation."
"\n(4) Pool size: Directly use the pool size as an estimate of the number of individuals, "
"\n(4) `pool-size`: Directly use the pool size as an estimate of the number of individuals, "
"instead of computing the expected value. This assumes the number of individuals sequenced "
"to be equal to the pool size, and is good under high read depths."
"\n(5) Uncorrected: The Achaz correction is not applied, so that the result is simply "
"\n(5) `uncorrected`: The Achaz correction is not applied, so that the result is simply "
"Theta Pi minus Theta Watterson. Hence, magnitudes of values are not comparable to classic "
"Tajima's D. Still, using their sign, and comparing them across windows can be useful."
);
Expand Down

0 comments on commit a879716

Please sign in to comment.