Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
khalid
radsex
Commits
0b793ce8
Commit
0b793ce8
authored
Feb 25, 2020
by
Romain Feron
Browse files
Fixed bug with signif / subset not outputting sequence
parent
2a898e5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/depth_table.h
View file @
0b793ce8
...
...
@@ -30,11 +30,11 @@ struct Marker {
output_file
<<
"
\n
"
;
}
void
output_fasta
(
std
::
ofstream
&
output_file
,
uint
16_t
min_depth
)
const
{
void
output_fasta
(
std
::
ofstream
&
output_file
,
uint
min_depth
)
const
{
output_file
<<
">"
<<
this
->
id
;
for
(
auto
group
:
this
->
groups
)
output_file
<<
"_"
<<
group
.
first
<<
":"
<<
group
.
second
;
output_file
<<
"_mindepth:"
<<
min_depth
<<
"_p:"
<<
this
->
p
<<
"
\n
"
<<
this
->
sequence
<<
"
\n
"
;
output_file
<<
"_p:"
<<
this
->
p
<<
"_mindepth:"
<<
min_depth
<<
"
\n
"
<<
this
->
sequence
<<
"
\n
"
;
}
};
...
...
src/signif.cpp
View file @
0b793ce8
...
...
@@ -23,7 +23,7 @@ void signif(Parameters& parameters) {
MarkersQueue
markers_queue
;
std
::
mutex
queue_mutex
;
std
::
thread
parsing_thread
(
table_parser
,
std
::
ref
(
parameters
),
std
::
ref
(
popmap
),
std
::
ref
(
markers_queue
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
header
),
std
::
ref
(
parsing_ended
),
tru
e
,
false
);
std
::
thread
parsing_thread
(
table_parser
,
std
::
ref
(
parameters
),
std
::
ref
(
popmap
),
std
::
ref
(
markers_queue
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
header
),
std
::
ref
(
parsing_ended
),
fals
e
,
false
);
std
::
thread
processing_thread
(
processor
,
std
::
ref
(
markers_queue
),
std
::
ref
(
popmap
),
std
::
ref
(
parameters
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
candidate_markers
),
std
::
ref
(
n_markers
),
std
::
ref
(
parsing_ended
),
BATCH_SIZE
);
parsing_thread
.
join
();
...
...
@@ -76,7 +76,7 @@ void processor(MarkersQueue& markers_queue, Popmap& popmap, Parameters& paramete
++
n_markers
;
// Increment total number of markers for Bonferroni correction
chi_squared
=
get_chi_squared
(
marker
.
groups
[
parameters
.
group1
],
marker
.
groups
[
parameters
.
group2
],
popmap
.
counts
[
parameters
.
group1
],
popmap
.
counts
[
parameters
.
group2
]);
marker
.
p
=
get_chi_squared_p
(
chi_squared
);
marker
.
p
=
static_cast
<
float
>
(
get_chi_squared_p
(
chi_squared
)
)
;
// First pass: filter markers with non-corrected p < 0.05
if
(
static_cast
<
float
>
(
marker
.
p
)
<
parameters
.
signif_threshold
)
candidate_markers
.
push_back
(
marker
);
...
...
src/subset.cpp
View file @
0b793ce8
...
...
@@ -17,7 +17,7 @@ void subset(Parameters& parameters) {
std
::
ofstream
output_file
=
open_output
(
parameters
.
output_file_path
);
std
::
thread
parsing_thread
(
table_parser
,
std
::
ref
(
parameters
),
std
::
ref
(
popmap
),
std
::
ref
(
markers_queue
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
header
),
std
::
ref
(
parsing_ended
),
tru
e
,
false
);
std
::
thread
parsing_thread
(
table_parser
,
std
::
ref
(
parameters
),
std
::
ref
(
popmap
),
std
::
ref
(
markers_queue
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
header
),
std
::
ref
(
parsing_ended
),
fals
e
,
false
);
std
::
thread
processing_thread
(
processor
,
std
::
ref
(
markers_queue
),
std
::
ref
(
popmap
),
std
::
ref
(
parameters
),
std
::
ref
(
queue_mutex
),
std
::
ref
(
output_file
),
std
::
ref
(
parsing_ended
),
BATCH_SIZE
);
parsing_thread
.
join
();
...
...
Write
Preview
Supports
Markdown
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