Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ROCK
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Véronique LEGRAND
ROCK
Commits
cc11d121
Commit
cc11d121
authored
4 years ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
changed text indentation for verbose mode
parent
06fb25a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rock.cpp
+32
-22
32 additions, 22 deletions
src/rock.cpp
with
32 additions
and
22 deletions
src/rock.cpp
+
32
−
22
View file @
cc11d121
...
...
@@ -13,6 +13,7 @@
#include
<string.h>
#include
<iostream>
#include
<iomanip>
#include
<map>
#include
<vector>
#include
<unistd.h>
...
...
@@ -58,50 +59,59 @@ void printCMSparams(const CMSparams& p) {
cout
<<
"lambda="
<<
p
.
lambda
<<
endl
;
cout
<<
"kappa="
<<
p
.
kappa
<<
endl
;
cout
<<
"kappa_prime="
<<
p
.
kappa_prime
<<
endl
;
cout
<<
"filter_size="
<<
p
.
filter_size
<<
endl
;
cout
<<
"filter_size="
<<
p
.
max_
filter_size
<<
endl
;
cout
<<
"filter_PE_separately="
<<
p
.
filter_PE_separately
<<
endl
;
}
const
void
printVerboseInfo
(
const
ROCKparams
&
Rparms
,
const
Filter
&
filter
,
const
T_read_counters
&
rc
,
\
const
unsigned
long
&
tot_nb_kmers
)
{
cout
<<
setw
(
40
)
<<
left
<<
"total available RAM (Gb)"
<<
getNodePhysMemory
()
<<
endl
;
std
::
vector
<
IO_fq_files
>::
iterator
it_s
;
vector
<
PE_files
>::
iterator
it_pe
;
vector
<
PE_files
>
v_PE_files
=
Rparms
.
get_PE_files
();
vector
<
IO_fq_files
>
single_files
=
Rparms
.
get_single_files
();
for
(
it_pe
=
v_PE_files
.
begin
();
it_pe
!=
v_PE_files
.
end
();
it_pe
++
)
{
cout
<<
"PE input files
"
<<
it_pe
->
PE1
.
in_fq_file
<<
" "
<<
it_pe
->
PE2
.
in_fq_file
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"PE input files"
<<
it_pe
->
PE1
.
in_fq_file
<<
" "
<<
it_pe
->
PE2
.
in_fq_file
<<
endl
;
}
for
(
it_s
=
single_files
.
begin
();
it_s
!=
single_files
.
end
();
it_s
++
)
{
cout
<<
"SE input file(s)
"
<<
it_s
->
in_fq_file
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"SE input file(s)"
<<
it_s
->
in_fq_file
<<
endl
;
}
CMSparams
parms
=
Rparms
.
getCMSparams
();
cout
<<
"upper-bound coverage depth "
<<
parms
.
kappa
<<
endl
;
cout
<<
"lower-bound coverage depth "
<<
parms
.
kappa_prime
<<
endl
;
cout
<<
"k-mer length "
<<
Rparms
.
get_k
()
<<
endl
;
cout
<<
"expected no. distinct k-mers "
<<
Rparms
.
get_expected_nbKmers
()
<<
endl
;
cout
<<
"no. hash. function(s) "
<<
parms
.
lambda
<<
endl
;
cout
<<
"expected false positive proba. "
<<
Rparms
.
get_expected_collision_proba
()
<<
"(cov. depth > 1)"
<<
endl
;
for
(
int
i
=
0
;
i
<
parms
.
lambda
;
i
++
)
cout
<<
"no. buckets for hash. "
<<
i
+
1
<<
" "
<<
Pi_js
[
i
]
<<
endl
;
cout
<<
"no. bits per bucket "
<<
filter
.
getNbBitsForCounters
()
<<
endl
;
cout
<<
"count-min sketch size (Gb) "
<<
Rparms
.
getFilterSize
()
<<
endl
;
cout
<<
"no. input reads "
<<
rc
.
nb_input_reads
<<
endl
;
cout
<<
"no. input k-mers"
<<
tot_nb_kmers
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"upper-bound coverage depth"
<<
parms
.
kappa
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"lower-bound coverage depth"
<<
parms
.
kappa_prime
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"k-mer length"
<<
Rparms
.
get_k
()
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"expected no. distinct k-mers"
<<
Rparms
.
get_expected_nbKmers
()
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"no. hash. function(s)"
<<
parms
.
lambda
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"expected false positive proba."
<<
Rparms
.
get_expected_collision_proba
()
<<
" (cov. depth > 1)"
<<
endl
;
for
(
int
i
=
0
;
i
<
parms
.
lambda
;
i
++
)
{
string
tmp
=
"no. buckets for hash. "
;
tmp
+=
to_string
(
i
+
1
);
cout
<<
setw
(
40
)
<<
left
<<
tmp
<<
Pi_js
[
i
]
<<
endl
;
}
cout
<<
setw
(
40
)
<<
left
<<
"no. bits per bucket"
<<
filter
.
getNbBitsForCounters
()
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"count-min sketch size (Gb)"
<<
Rparms
.
getFilterSize
()
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"no. input reads"
<<
rc
.
nb_input_reads
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"no. input k-mers"
<<
tot_nb_kmers
<<
endl
;
unsigned
long
approx_nbDiffKm
=
filter
.
getApproxNbDistinctKMers
();
std
::
vector
<
unsigned
long
>
zeroes
=
filter
.
getUnsetBuckets
();
for
(
int
i
=
0
;
i
<=
parms
.
lambda
-
1
;
i
++
)
cout
<<
"no. unset buckets for hash. "
<<
i
+
1
<<
zeroes
[
parms
.
lambda
-
1
-
i
]
<<
endl
;
cout
<<
"approx. no. distinct k-mers "
<<
approx_nbDiffKm
<<
endl
;
for
(
int
i
=
0
;
i
<=
parms
.
lambda
-
1
;
i
++
){
string
tmp
=
"no. unset buckets for hash. "
;
tmp
+=
to_string
(
i
+
1
);
cout
<<
setw
(
40
)
<<
left
<<
tmp
<<
zeroes
[
parms
.
lambda
-
1
-
i
]
<<
endl
;
}
cout
<<
setw
(
40
)
<<
left
<<
"approx. no. distinct k-mers"
<<
approx_nbDiffKm
<<
endl
;
int
smallest_kappa
=
parms
.
kappa
;
if
(
parms
.
kappa_prime
>
0
)
smallest_kappa
=
parms
.
kappa_prime
;
float
p
=
getCollisionProba
(
smallest_kappa
,
approx_nbDiffKm
,
Pi_js
[
0
],
parms
.
lambda
);
cout
<<
"approx. false positive proba.
"
<<
p
<<
endl
;
cout
<<
"no. selected reads
"
<<
rc
.
nb_output_reads
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"approx. false positive proba."
<<
p
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"no. selected reads"
<<
rc
.
nb_output_reads
<<
endl
;
for
(
it_pe
=
v_PE_files
.
begin
();
it_pe
!=
v_PE_files
.
end
();
it_pe
++
)
{
cout
<<
"PE output files
"
<<
it_pe
->
PE1
.
out_fq_file
<<
" "
<<
it_pe
->
PE2
.
out_fq_file
<<
" "
<<
it_pe
->
PE1
.
undef_fq_file
<<
" "
<<
it_pe
->
PE2
.
undef_fq_file
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"PE output files"
<<
it_pe
->
PE1
.
out_fq_file
<<
" "
<<
it_pe
->
PE2
.
out_fq_file
<<
" "
<<
it_pe
->
PE1
.
undef_fq_file
<<
" "
<<
it_pe
->
PE2
.
undef_fq_file
<<
endl
;
}
for
(
it_s
=
single_files
.
begin
();
it_s
!=
single_files
.
end
();
it_s
++
)
{
cout
<<
"SE output file(s)
"
<<
it_s
->
out_fq_file
<<
" "
<<
it_s
->
undef_fq_file
<<
endl
;
cout
<<
setw
(
40
)
<<
left
<<
"SE output file(s)"
<<
it_s
->
out_fq_file
<<
" "
<<
it_s
->
undef_fq_file
<<
endl
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment