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
7d2db00b
Commit
7d2db00b
authored
8 years ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
fixed compilation issues under linux gcc4.7.4
parent
7655a258
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Filter.hpp
+3
-0
3 additions, 0 deletions
src/Filter.hpp
src/ROCKparams.cpp
+57
-0
57 additions, 0 deletions
src/ROCKparams.cpp
src/ROCKparams.h
+2
-57
2 additions, 57 deletions
src/ROCKparams.h
with
62 additions
and
57 deletions
src/Filter.hpp
+
3
−
0
View file @
7d2db00b
...
...
@@ -6,6 +6,9 @@
*/
#ifndef FILTER_HPP_
#define FILTER_HPP_
#include
<errno.h>
#include
<sys/time.h>
#include
<sys/resource.h>
#include
"CountMinSketch.hpp"
#include
"ReadProcessor.h"
...
...
This diff is collapsed.
Click to expand it.
src/ROCKparams.cpp
+
57
−
0
View file @
7d2db00b
...
...
@@ -222,3 +222,60 @@ int ROCKparams::processInOutFileArgs(const std::vector<string>& v_input_lines,st
}
return
EXIT_SUCCESS
;
}
void
ROCKparams
::
initFromMainOptsArgs
(
int
argc
,
char
**
argv
)
{
int
i
;
std
::
vector
<
string
>
v_input_lines
;
std
::
vector
<
string
>
v_output_lines
;
while
((
i
=
getopt
(
argc
,
argv
,
"i:o:l:k:c:C:g:n:v"
))
!=
-
1
)
{
switch
(
i
)
{
case
'i'
:
input_file
=
optarg
;
break
;
case
'c'
:
parms
.
kappa_prime
=
atoi
(
optarg
);
break
;
case
'h'
:
usage
(
EXIT_SUCCESS
);
break
;
case
'o'
:
output_file
=
optarg
;
break
;
case
'C'
:
parms
.
kappa
=
atoi
(
optarg
);
if
(
parms
.
kappa
<=
0
||
parms
.
kappa
>
get_mask
<
unsigned
short
>::
value
)
{
cout
<<
"Bad value for kappa. Must choose kappa so that 0<kappa<="
<<
get_mask
<
unsigned
short
>::
value
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'l'
:
parms
.
lambda
=
atoi
(
optarg
);
if
(
parms
.
lambda
<=
0
)
{
cout
<<
"Bad value for lambda. Choose a value that is >0 or let ROCK choose for you."
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'k'
:
k
=
atoi
(
optarg
);
if
(
k
<=
0
||
k
>
32
)
{
cout
<<
"Bad value for k. Must choose k so that 0<k<=32."
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'n'
:
nb_k_mers
=
atoi
(
optarg
);
break
;
// number of distinct k-mers
case
'g'
:
// cout<<optarg<<endl;
g
=
atoi
(
optarg
);
break
;
case
'v'
:
verbose_mode
=
1
;
break
;
default
:
usage
(
EXIT_FAILURE
);
break
;
}
}
processMainArgs
(
optind
,
argc
,
argv
,
v_input_lines
);
optArgConsistency
(
input_file
,
output_file
,
g
,
parms
,
nb_k_mers
,
v_input_lines
);
if
(
nb_k_mers
)
{
expected_collision_proba
=
getCollisionProba
(
nb_k_mers
,
parms
.
lambda
);
}
if
(
v_input_lines
.
empty
()
&&
(
loadInOutFileArgs
(
input_file
,
output_file
,
v_input_lines
,
v_output_lines
)
==
EXIT_FAILURE
))
throw
EXIT_FAILURE
;
if
(
processInOutFileArgs
(
v_input_lines
,
v_output_lines
,
single_files
,
v_PE_files
,
f_id
)
!=
EXIT_SUCCESS
)
throw
EXIT_FAILURE
;
}
This diff is collapsed.
Click to expand it.
src/ROCKparams.h
+
2
−
57
View file @
7d2db00b
...
...
@@ -42,7 +42,7 @@ class ROCKparams{
void
computeLambda
();
void
processMainArgs
(
int
optind
,
const
int
argc
,
char
**
argv
,
std
::
vector
<
string
>&
v_input_lines
);
void
processMainArgs
(
int
optind
,
int
argc
,
char
**
argv
,
std
::
vector
<
string
>&
v_input_lines
);
int
loadInOutFileArgs
(
const
std
::
string
&
input_file
,
const
std
::
string
&
output_file
,
std
::
vector
<
string
>&
v_input_lines
,
std
::
vector
<
string
>&
v_output_lines
);
int
loadFileArgs
(
const
std
::
string
&
afile
,
std
::
vector
<
string
>&
v_lines
);
void
removePathfromFName
(
string
&
FName
);
...
...
@@ -79,62 +79,7 @@ public:
void
initFromMainOptsArgs
(
int
argc
,
char
*
argv
[])
{
int
i
;
std
::
vector
<
string
>
v_input_lines
;
std
::
vector
<
string
>
v_output_lines
;
while
((
i
=
getopt
(
argc
,
argv
,
"i:o:l:k:c:C:g:n:v"
))
!=
-
1
)
{
switch
(
i
)
{
case
'i'
:
input_file
=
optarg
;
break
;
case
'c'
:
parms
.
kappa_prime
=
atoi
(
optarg
);
break
;
case
'h'
:
usage
(
EXIT_SUCCESS
);
break
;
case
'o'
:
output_file
=
optarg
;
break
;
case
'C'
:
parms
.
kappa
=
atoi
(
optarg
);
if
(
parms
.
kappa
<=
0
||
parms
.
kappa
>
get_mask
<
unsigned
short
>::
value
)
{
cout
<<
"Bad value for kappa. Must choose kappa so that 0<kappa<="
<<
get_mask
<
unsigned
short
>::
value
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'l'
:
parms
.
lambda
=
atoi
(
optarg
);
if
(
parms
.
lambda
<=
0
)
{
cout
<<
"Bad value for lambda. Choose a value that is >0 or let ROCK choose for you."
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'k'
:
k
=
atoi
(
optarg
);
if
(
k
<=
0
||
k
>
32
)
{
cout
<<
"Bad value for k. Must choose k so that 0<k<=32."
<<
endl
;
usage
(
EXIT_FAILURE
);
}
break
;
case
'n'
:
nb_k_mers
=
atoi
(
optarg
);
break
;
// number of distinct k-mers
case
'g'
:
// cout<<optarg<<endl;
g
=
atoi
(
optarg
);
break
;
case
'v'
:
verbose_mode
=
1
;
break
;
default
:
usage
(
EXIT_FAILURE
);
break
;
}
}
processMainArgs
(
optind
,
argc
,
argv
,
v_input_lines
);
optArgConsistency
(
input_file
,
output_file
,
g
,
parms
,
nb_k_mers
,
v_input_lines
);
if
(
nb_k_mers
)
{
expected_collision_proba
=
getCollisionProba
(
nb_k_mers
,
parms
.
lambda
);
}
if
(
v_input_lines
.
empty
()
&&
(
loadInOutFileArgs
(
input_file
,
output_file
,
v_input_lines
,
v_output_lines
)
==
EXIT_FAILURE
))
throw
EXIT_FAILURE
;
if
(
processInOutFileArgs
(
v_input_lines
,
v_output_lines
,
single_files
,
v_PE_files
,
f_id
)
!=
EXIT_SUCCESS
)
throw
EXIT_FAILURE
;
}
void
initFromMainOptsArgs
(
int
argc
,
char
**
argv
);
CMSparams
getCMSparams
()
{
return
parms
;
...
...
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