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
4a3ab705
Commit
4a3ab705
authored
Aug 17, 2021
by
khalid
Browse files
Now processTagged return CPM normalized read counts
parent
2f069bb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/processTagged.cpp
View file @
4a3ab705
...
...
@@ -285,7 +285,17 @@ inline void process_file(taggedInputFile& input_file, std::unordered_map<std::st
// Transfer the results from the temp data structure to the full data structure
results_mutex
.
lock
();
for
(
auto
marker
:
temp_results
)
results
[
marker
.
first
][
input_file
.
individual_name
]
+=
marker
.
second
;
//CPM normalization
double
nbreads
=
0
;
for
(
auto
marker
:
temp_results
)
{
nbreads
+=
marker
.
second
;
}
double
permillion
=
nbreads
/
1000000
;
for
(
auto
marker
:
temp_results
)
{
results
[
marker
.
first
][
input_file
.
individual_name
]
+=
round
(
marker
.
second
/
permillion
);
}
results_mutex
.
unlock
();
log
(
"Finished processing individual "
+
input_file
.
individual_name
+
" trimmed tag "
+
tag
+
" and "
+
std
::
to_string
(
maxtagl
-
tagl
)
+
" bases in the tail for loci"
+
input_file
.
path
);
...
...
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