Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
QTL
spell-qtl
Commits
0810321c
Commit
0810321c
authored
Jun 26, 2014
by
Damien Leroux
Browse files
WIP.
parent
88f6b676
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/generation_rs.h
View file @
0810321c
...
...
@@ -320,7 +320,7 @@ struct population_marker_observation {
marker_data
observations
;
std
::
map
<
char
,
VectorXb
>
observation_vectors
;
void
compute_observation_vectors
(
const
impl
::
generation_rs
*
g
,
const
marker_observation_spec
&
obs_spec
);
...
...
include/settings.h
View file @
0810321c
...
...
@@ -37,6 +37,8 @@ struct settings_t {
std
::
string
map_filename
;
std
::
vector
<
chromosome
>
map
;
/*format_specification_t* marker_observation_specs;*/
enum
observation_type_t
{
Geno
,
Line
};
observation_type_t
observation_type
;
std
::
map
<
std
::
string
,
marker_observation_spec
>
marker_observation_specs
;
std
::
vector
<
std
::
string
>
marker_observation_specs_filenames
;
std
::
map
<
std
::
string
,
population
>
populations
;
...
...
@@ -98,6 +100,7 @@ struct settings_t {
:
notes
()
,
design
(
0
)
,
map_filename
(),
map
()
,
observation_type
(
ObsLine
)
,
marker_observation_specs
()
,
populations
()
,
working_set
()
...
...
@@ -264,6 +267,20 @@ struct format_specification_t {
};
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
settings_t
::
observation_type_t
ot
)
{
switch
(
ot
)
{
case
settings_t
::
observation_type_t
::
Line
:
os
<<
"line"
;
break
;
case
settings_t
::
observation_type_t
::
Geno
:
os
<<
"geno"
;
break
;
};
return
os
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
settings_t
&
);
namespace
read_data
{
...
...
src/input/read_settings.cc
View file @
0810321c
...
...
@@ -7,7 +7,7 @@
#include "labelled_matrix.h"
#include "cache2.h"
#include "model.h"
#include "computations/
basic_data
.h"
#include "computations/
probabilities
.h"
#include <regex>
...
...
@@ -416,6 +416,47 @@ arguments = {
exit
(
0
);
SAFE_IGNORE_CALLBACK_ARGS
;
}},
{{
"-Dpop"
,
"--dump-POP"
},
{},
"[DEBUG] Dump parental origin probabilities and exit"
,
true
,
{},
[](
CALLBACK_ARGS
)
{
ensure
(
target
);
active_settings
=
target
;
msg_handler_t
::
check
(
true
);
active_settings
->
finalize
();
active_settings
->
set_title
(
"Checking the validity of the configuration"
);
if
(
!
active_settings
->
sanity_check
())
{
exit
(
-
1
);
}
msg_handler_t
::
check
(
true
);
locus_key
lk
;
Eigen
::
IOFormat
fmt
(
StreamPrecision
,
DontAlignCols
,
"
\t
"
,
"
\n
"
,
""
,
""
,
""
,
""
);
for
(
const
chromosome
&
c
:
active_settings
->
map
)
{
auto
loci
=
compute_steps
(
c
.
condensed
.
marker_locus
,
target
->
step
);
for
(
const
auto
&
kv
:
active_settings
->
populations
)
{
const
auto
&
pop
=
kv
.
second
;
context_key
ck
(
new
context_key_struc
(
&
pop
,
&
c
,
loci
));
auto
vck
=
as_value
(
ck
);
collection
<
multi_generation_observations
>
vmgo
=
make_collection
<
Disk
>
(
population_marker_obs
,
vck
,
range
<
int
>
(
0
,
ck
->
pop
->
size
(),
1
));
collection
<
locus_probabilities_type
>
alp
=
make_collection
<
Disk
>
(
locus_probabilities
,
vck
,
as_value
(
lk
),
vmgo
,
as_value
(
ck
->
loci
));
OUT
(
"CHROMOSOME "
<<
c
.
name
<<
" POPULATION "
<<
kv
.
first
<<
std
::
endl
);
int
i
=
0
;
for
(
const
auto
&
pm
:
alp
)
{
OUT
(
'#'
<<
(
++
i
)
<<
std
::
endl
<<
pm
<<
std
::
endl
);
}
}
}
exit
(
0
);
SAFE_IGNORE_CALLBACK_ARGS
;
}},
{{
"-Dstfopom"
,
"--dump-stfopom"
},
{
"gen"
,
"order"
},
"[DEBUG] Dump ST(fo)POM"
,
...
...
@@ -648,6 +689,17 @@ arguments = {
SAFE_IGNORE_CALLBACK_ARGS
;
}},
{{
"-ot"
,
"--observation-type"
},
{
"type"
},
"Specify how to interpret the observation data.
\n
If type is 'line'"
/* TODO */
,
false
,
{
&
settings_t
::
observation_type
},
[](
CALLBACK_ARGS
)
{
/* TODO */
SAFE_IGNORE_CALLBACK_ARGS
;
}},
{{
"-mos"
,
"--marker-observations-spec"
},
{
"path"
},
"Path to the marker observation specification file"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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