Commit 5adc5cc5 authored by Damien Leroux's avatar Damien Leroux
Browse files

Updated documentation and fixed default behaviour of traits.

parent 033edefa
This diff is collapsed.
......@@ -58,24 +58,47 @@ Enabled by default only if output is on a terminal.
**-na**,**--no-ansi**
: Don't use ANSI escape sequences, don't display colors or realtime progress information.
## Model options
**-rj**,**--join-radius** *DISTANCE*
: Specify the maximum distance from a selected locus to compute joint probabilities. Default is **10**.
**-rs**,**--skip-radius** *DISTANCE*
: Specify the maximum distance from a selected locus to skip tests. Default is **1**.
## Input datasets
The following configures the construction of the linear model.
The following specifies the datasets you want processed. A dataset specification starts with argument -p, followed by one or more arguments -m.
**output-nppop**
: Compute the n-point Parental Origin Probabilities and exit. The results will be written under the **WORK_DIRECTORY/NAME.n-point** directory.
**-gm**,**-genetic-map** *PATH*
: Path to the genetic map file.
**-p**,**-population** *QTL_generation_name* *PHEN_PATH*
: Specify a new population (dataset) to work on.
## Model options
The following configures the construction of the linear model.
**connected**
: Select connected mode. Disabled by default.
In connected mode, the same ancestors in two datasets share the same column in the linear model.
**epistasis**
: Detect epistasis. Disabled by default.
## Working set options
The following configures the analysis domain.
**lg** *LINKAGE GROUP NAMES*
: Specify the list of linkage groupe to study.
**covar** *COVARIABLE NAMES*
: Specify the list of covariables to put in the model.
**traits** *TRAIT NAMES*
: Specify the list of traits to analyse.
**pleiotropy** *TOLERANCE*
: Detect pleiotropic QTLs. Disabled by default.
**pleiotropy** *PLEIOTROPIC_TRAIT_NAME* *TOLERANCE* *TRAIT_NAMES*
: Specify a pleiotropic trait. This trait will be added to the list of traits to analyze. 1.e-3 is a good default value for *TOLERANCE*.
## Processing options
......@@ -86,6 +109,9 @@ The standard pipeline is:
3. QTLs detection
4. effects estimation
**output-nppop**
: Compute the n-point Parental Origin Probabilities and exit. The results will be written under the **WORK_DIRECTORY/NAME.n-point** directory.
**qtl-threshold-permutations** *VALUE*
: Set the number of permutations to compute the QTL threshold value in automatic mode. Default is **10000**.
......@@ -104,6 +130,9 @@ The standard pipeline is:
**step** *VALUE*
: Step size in cM. Defaults to **1**.
**lod-support** *VALUE*
: LOD support value. Defaults to **1**.
**skeleton** *MODE* *marker,...\ OR \ distance*
: Setup the cofactor detection skeleton. Mode can be either *manual*, *auto* or *none*.
......
......@@ -34,7 +34,7 @@ extern "C" {
#include <ftw.h>
}
#define OUT(__x__) do { msg_handler_t::cout() << __x__ << std::endl; } while (0)
#define OUT(__x__) do { msg_handler_t::cout() << __x__; } while (0)
/*#include "computations.h"*/
......
......@@ -525,11 +525,16 @@ inline
std::vector<trait>
assemble_traits(const std::vector<trait>& src, const std::vector<std::string>& with_traits, const std::vector<pleiotropy_descr>& pleio) {
std::vector<trait> ret(src.size() + pleio.size());
auto it = std::copy_if(src.begin(), src.end(), ret.begin(), [&](const trait& t) { return std::find(with_traits.begin(), with_traits.end(), t.name) != with_traits.end(); });
MSG_DEBUG("with_traits.empty() ? " << with_traits.empty());
auto it = with_traits.empty()
? std::copy(src.begin(), src.end(), ret.begin())
: std::copy_if(src.begin(), src.end(), ret.begin(),
[&] (const trait& t) { return std::find(with_traits.begin(), with_traits.end(), t.name) != with_traits.end(); });
ret.resize(it - ret.begin());
for (const auto& d: pleio) {
ret.emplace_back(src, d.traits, d.name, d.tolerance);
}
MSG_DEBUG("assembled traits " << ret);
return ret;
}
......
......@@ -35,7 +35,7 @@ extern "C" {
#include <ftw.h>
}
#define OUT(__x__) do { msg_handler_t::cout() << __x__ << std::endl; } while (0)
#define OUT(__x__) do { msg_handler_t::cout() << __x__; } while (0)
/*#include "computations.h"*/
......
......@@ -61,7 +61,7 @@ std::vector<trait> read_trait(file& is, const std::vector<std::string>& filter_n
}
++counter;
}
if (ret.back().good_indices.size() == 0 || std::find(filter_names.begin(), filter_names.end(), name) == filter_names.end()) {
if (ret.back().good_indices.size() == 0 || (!!filter_names.size() && std::find(filter_names.begin(), filter_names.end(), name) == filter_names.end())) {
ret.pop_back();
} else {
ret.back().dim_names = {ret.back().name};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment