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
d08a1daf
Commit
d08a1daf
authored
4 years ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
fixed getting CMS size
parent
3e977336
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/Filter.hpp
+5
-4
5 additions, 4 deletions
src/Filter.hpp
src/ROCKparams.cpp
+1
-1
1 addition, 1 deletion
src/ROCKparams.cpp
src/ROCKparams.h
+6
-4
6 additions, 4 deletions
src/ROCKparams.h
src/rock.cpp
+1
-1
1 addition, 1 deletion
src/rock.cpp
with
13 additions
and
10 deletions
src/Filter.hpp
+
5
−
4
View file @
d08a1daf
...
...
@@ -32,7 +32,7 @@ class Filter {
FasqQualThreshold
qual_thres
;
// long nb_bytes_before_fill_CMS,nb_bytes_after_fill_CMS;
long
nb_bytes_CMS
;
//! Number of bytes taken by the underlying CMS.
//
long nb_bytes_CMS; //! Number of bytes taken by the underlying CMS.
void
getRSS
();
...
...
@@ -48,7 +48,7 @@ public:
if
(
parms
.
kappa
<
ubytemask
)
pByteCMS
=
new
ByteCountMinSketch
(
parms
);
else
pShortCMS
=
new
ShortCountMinSketch
(
parms
);
qual_thres
=
the_qual_thres
;
getRSS
();
//
getRSS();
//nb_bytes_CMS=0;
//nb_bytes_after_fill_CMS=0;
}
...
...
@@ -143,7 +143,7 @@ template <typename T> void Filter::underlyinglowFilterCMS(FqBaseBackend* map_id_
void
Filter
::
fillCMS
(
FqBaseBackend
*
map_id_backend
[],
int
nb_be
,
int
k
,
srp
*
io_sr
)
{
if
(
pByteCMS
!=
NULL
)
underlyingfillCMS
<
unsigned
char
>
(
map_id_backend
,
nb_be
,
k
,
io_sr
,
pByteCMS
);
else
underlyingfillCMS
<
unsigned
short
>
(
map_id_backend
,
nb_be
,
k
,
io_sr
,
pShortCMS
);
getRSS
();
//
getRSS();
}
void
Filter
::
lowFilterCMS
(
FqBaseBackend
*
map_id_backend
[],
int
nb_be
,
int
k
,
srp
*
io_sr
)
{
...
...
@@ -161,6 +161,7 @@ std::vector<unsigned long> Filter::getUnsetBuckets() const {
else
return
pShortCMS
->
getUnsetBuckets
();
}
/*
void Filter::getRSS() {
struct rusage usage;
int res2=getrusage(RUSAGE_SELF,&usage);
...
...
@@ -172,7 +173,7 @@ unsigned long Filter::getSize() {
unsigned long cms_size=nb_bytes_CMS;
// cms_size/=8; ru_maxrss seems to be already in Bytes.
return cms_size;
}
}
*/
unsigned
int
Filter
::
getNbBitsForCounters
()
const
{
if
(
pByteCMS
!=
NULL
)
return
sizeof
(
unsigned
char
)
*
8
;
...
...
This diff is collapsed.
Click to expand it.
src/ROCKparams.cpp
+
1
−
1
View file @
d08a1daf
...
...
@@ -144,7 +144,7 @@ void ROCKparams::optArgConsistency(const string& input_file,const string& output
#ifdef DEBUG
cout
<<
"parms.lambda="
<<
parms
.
lambda
<<
" UINT_MAX="
<<
UINT_MAX
<<
endl
;
#endif
unsigned
long
cms_size
=
k_arr_cms_size
;
cms_size
=
k_arr_cms_size
;
cms_size
*=
parms
.
lambda
;
if
(
parms
.
kappa
>
get_mask
<
unsigned
char
>::
value
)
cms_size
=
cms_size
*
sizeof
(
unsigned
short
);
cms_size
=
ceil
(
cms_size
/
1024.0
/
1024
/
1024
);
// convert to gigabytes.
...
...
This diff is collapsed.
Click to expand it.
src/ROCKparams.h
+
6
−
4
View file @
d08a1daf
...
...
@@ -146,15 +146,17 @@ public:
return
k
;
}
void
setFilterSize
(
unsigned
long
fsize
)
{
// cms_size is computed when ROCK starts.
/*void setFilterSize(unsigned long fsize) {
cms_size=fsize;
}
}
*/
unsigned
long
getFilterSize
()
const
{
unsigned
long
cms_size_in_GB
=
cms_size
/
1024
;
/*
unsigned long cms_size_in_GB=cms_size/1024;
cms_size_in_GB/=1024;
cms_size_in_GB/=1024;
return
cms_size_in_GB
;
return cms_size_in_GB;*/
return
cms_size
;
}
...
...
This diff is collapsed.
Click to expand it.
src/rock.cpp
+
1
−
1
View file @
d08a1daf
...
...
@@ -167,7 +167,7 @@ int main(int argc,char * argv[]) {
cout
<<
"Now going to remove read with cov<kappa_prime"
<<
endl
;
#endif
main_parms
.
setFilterSize
(
the_filter
.
getSize
());
//
main_parms.setFilterSize(the_filter.getSize());
// no more used max_rss is not precise enough
// Now, remove reads that are beneath kappa_prime
if
(
parms
.
kappa_prime
)
the_filter
.
lowFilterCMS
(
map_id_backend
,
f_id
,
k
,
&
sr
);
...
...
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