Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
QTL
spell-qtl
Commits
eb3c5581
Commit
eb3c5581
authored
Jun 12, 2017
by
Damien Leroux
Browse files
Switched to eigen-3.3 and fixed behaviour when with_traits is empty.
parent
8a86e99b
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/bayes/output.h
View file @
eb3c5581
...
...
@@ -1230,6 +1230,7 @@ struct pop_data_type {
ret
[
ti
].
P
=
traits
[
ti
].
P
;
ret
[
ti
].
raw
=
reduce_with_good_indices
(
traits
[
ti
].
raw
,
traits
[
ti
].
good_indices
,
ret
[
ti
].
good_indices
);
ret
[
ti
].
values
=
reduce_with_good_indices
(
traits
[
ti
].
values
,
traits
[
ti
].
good_indices
,
ret
[
ti
].
good_indices
);
ret
[
ti
].
dim_names
=
traits
[
ti
].
dim_names
;
}
return
ret
;
};
...
...
include/computations/frontends4.h
View file @
eb3c5581
...
...
@@ -2386,9 +2386,9 @@ void analysis_report::report_final_model(model_manager& mm)
report_file
<<
std
::
string
(
"* There are not enough observations to compute a variance/covariance matrix. Results not displayed."
)
<<
std
::
endl
;
}
else
{
MatrixXd
Pt
=
TM
.
P
.
transpose
();
if
(
Pt
.
size
()
==
0
)
{
Pt
=
MatrixXd
::
Ones
(
1
,
1
);
}
//
if (Pt.size() == 0) {
//
Pt = MatrixXd::Ones(1, 1);
//
}
// MSG_DEBUG(TM.P);
// MSG_DEBUG(MATRIX_SIZE(Pt));
// MSG_DEBUG(MATRIX_SIZE(mm.vMcurrent->coefficients()));
...
...
include/eigen.h
View file @
eb3c5581
...
...
@@ -43,27 +43,27 @@ template <typename X> using SelfAdjointEigenSolver = Eigen::SelfAdjointEigenSolv
#endif
namespace
Eigen
{
template
<
>
struct
NumTraits
<
std
::
string
>
{
typedef
std
::
string
Real
;
typedef
std
::
string
NonInteger
;
typedef
std
::
string
Nested
;
enum
{
IsComplex
=
0
,
IsInteger
=
1
,
ReadCost
=
100
,
WriteCost
=
100
,
MulCost
=
1000
,
IsSigned
=
0
,
RequireInitialization
=
1
};
static
Real
epsilon
()
{
return
{
std
::
string
()
};
}
static
Real
dummy_precision
()
{
return
{
std
::
string
()
};
}
static
std
::
string
highest
()
{
return
std
::
string
();
}
static
std
::
string
lowest
()
{
return
std
::
string
();
}
};
}
//
namespace Eigen {
//
template<>
//
struct NumTraits<std::string> {
//
typedef std::string Real;
//
typedef std::string NonInteger;
//
typedef std::string Nested;
//
enum {
//
IsComplex = 0,
//
IsInteger = 1,
//
ReadCost = 100,
//
WriteCost = 100,
//
MulCost = 1000,
//
IsSigned = 0,
//
RequireInitialization = 1
//
};
//
static Real epsilon() { return { std::string() }; }
//
static Real dummy_precision() { return { std::string() }; }
//
static std::string highest() { return std::string(); }
//
static std::string lowest() { return std::string(); }
//
};
//
}
...
...
include/input/read_trait.h
View file @
eb3c5581
...
...
@@ -215,7 +215,7 @@ namespace read_data {
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
trait
&
t
)
{
os
<<
"<single_trait:"
<<
t
.
name
<<
' '
<<
t
.
values
.
cols
()
<<
" dimensions, "
<<
t
.
values
.
rows
()
<<
" values, "
;
os
<<
"<single_trait:"
<<
t
.
name
<<
' '
<<
t
.
values
.
cols
()
<<
" dimensions, "
<<
t
.
dim_names
<<
", "
<<
t
.
values
.
rows
()
<<
" values, "
;
// for (double v: t.values) {
// os << ' ' << v;
// }
...
...
include/linear_combination.h
View file @
eb3c5581
...
...
@@ -931,6 +931,7 @@ namespace Eigen {
typedef
combination_type
<
PARENT_TYPE
>
Real
;
typedef
combination_type
<
PARENT_TYPE
>
NonInteger
;
typedef
combination_type
<
PARENT_TYPE
>
Nested
;
typedef
combination_type
<
PARENT_TYPE
>
Literal
;
enum
{
IsComplex
=
0
,
IsInteger
=
1
,
...
...
include/settings.h
View file @
eb3c5581
...
...
@@ -598,10 +598,16 @@ settings_t::finalize()
MSG_ERROR
(
"Some single traits are already used in pleiotropic traits: "
<<
removed_traits
,
"Specify single trait names that are different from the trait names used in pleiotropic traits."
);
return
;
}
std
::
set
<
std
::
string
>
actual_single_traits
;
for
(
const
auto
&
gt
:
datasets
)
{
ifile
ifs
(
gt
.
second
);
auto
all_traits
=
read_data
::
read_trait
(
ifs
,
all_variables
);
auto
observed_traits
=
assemble_traits
(
all_traits
,
with_traits
,
pleiotropic_traits_descr
);
for
(
const
auto
&
t
:
observed_traits
)
{
if
(
t
.
dim_names
.
size
()
==
1
)
{
actual_single_traits
.
insert
(
t
.
name
);
}
}
pop_data
->
set_qtl_generation
(
gt
.
first
);
MSG_DEBUG
(
"with_covariables "
<<
with_covariables
);
MSG_DEBUG
(
"Creating covariables "
<<
" from traits "
<<
with_covariables
<<
" in list "
<<
observed_traits
);
...
...
@@ -630,7 +636,7 @@ settings_t::finalize()
trait_metadata
[
pleio
.
name
].
P
=
P
;
trait_metadata
[
pleio
.
name
].
dim_names
=
pleio
.
traits
;
}
for
(
const
auto
&
t
:
with
_traits
)
{
for
(
const
auto
&
t
:
actual_single
_traits
)
{
trait_metadata
[
t
].
P
=
MatrixXd
::
Ones
(
1
,
1
);
trait_metadata
[
t
].
dim_names
=
{
t
};
}
...
...
src/input/read_trait.cc
View file @
eb3c5581
...
...
@@ -70,9 +70,9 @@ std::vector<trait> read_trait(file& is, const std::vector<std::string>& filter_n
ret
.
back
().
raw
=
ret
.
back
().
values
;
ret
.
back
().
P
=
MatrixXd
::
Ones
(
1
,
1
);
}
//
MSG_DEBUG("... read " << counter << " values (" << (counter - ret.back()
->
values.size()) << " missing)");
MSG_DEBUG
(
"... read "
<<
counter
<<
" values ("
<<
(
counter
-
ret
.
back
()
.
values
.
size
())
<<
" missing)"
);
}
/*
MSG_DEBUG("all traits " << ret);
*/
MSG_DEBUG
(
"all traits "
<<
ret
);
return
ret
;
}
}
/* namespace read_data */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment