Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,712
Issues
1,712
List
Boards
Labels
Service Desk
Milestones
Merge Requests
87
Merge Requests
87
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
ee77c411
Commit
ee77c411
authored
Nov 04, 2014
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/germline.{h,cpp}: factorize the three Germline constructors with Germline::init()
parent
1a05fe6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
38 deletions
+23
-38
algo/core/germline.cpp
algo/core/germline.cpp
+20
-38
algo/core/germline.h
algo/core/germline.h
+3
-0
No files found.
algo/core/germline.cpp
View file @
ee77c411
#include "germline.h"
Germline
::
Germline
(
string
_code
,
char
_shortcut
,
string
f_rep_5
,
string
f_rep_4
,
string
f_rep_3
,
int
_delta_min
,
int
_delta_max
)
void
Germline
::
init
(
string
_code
,
char
_shortcut
,
int
_delta_min
,
int
_delta_max
)
{
code
=
_code
;
shortcut
=
_shortcut
;
index
=
0
;
affect_5
=
"V"
;
affect_4
=
""
;
affect_3
=
"J"
;
delta_min
=
_delta_min
;
delta_max
=
_delta_max
;
stats
.
setLabel
(
code
);
}
Germline
::
Germline
(
string
_code
,
char
_shortcut
,
string
f_rep_5
,
string
f_rep_4
,
string
f_rep_3
,
int
_delta_min
,
int
_delta_max
)
{
init
(
_code
,
_shortcut
,
_delta_min
,
_delta_max
);
f_reps_5
.
push_back
(
f_rep_5
);
f_reps_4
.
push_back
(
f_rep_4
);
f_reps_3
.
push_back
(
f_rep_3
);
affect_5
=
"V"
;
affect_4
=
""
;
affect_3
=
"J"
;
rep_5
=
Fasta
(
f_rep_5
,
2
,
"|"
,
cout
);
rep_4
=
Fasta
(
f_rep_4
,
2
,
"|"
,
cout
);
rep_3
=
Fasta
(
f_rep_3
,
2
,
"|"
,
cout
);
delta_min
=
_delta_min
;
delta_max
=
_delta_max
;
stats
.
setLabel
(
code
);
}
...
...
@@ -32,18 +38,12 @@ Germline::Germline(string _code, char _shortcut,
list
<
string
>
_f_reps_5
,
list
<
string
>
_f_reps_4
,
list
<
string
>
_f_reps_3
,
int
_delta_min
,
int
_delta_max
)
{
code
=
_code
;
shortcut
=
_shortcut
;
index
=
0
;
init
(
_code
,
_shortcut
,
_delta_min
,
_delta_max
);
f_reps_5
=
_f_reps_5
;
f_reps_4
=
_f_reps_4
;
f_reps_3
=
_f_reps_3
;
affect_5
=
"V"
;
affect_4
=
""
;
affect_3
=
"J"
;
for
(
list
<
string
>::
const_iterator
it
=
f_reps_5
.
begin
();
it
!=
f_reps_5
.
end
();
++
it
)
rep_5
=
Fasta
(
*
it
,
2
,
"|"
,
cout
);
// TODO: something like 'rep_5 += ...'
...
...
@@ -52,11 +52,6 @@ Germline::Germline(string _code, char _shortcut,
for
(
list
<
string
>::
const_iterator
it
=
f_reps_3
.
begin
();
it
!=
f_reps_3
.
end
();
++
it
)
rep_3
=
Fasta
(
*
it
,
2
,
"|"
,
cout
);
delta_min
=
_delta_min
;
delta_max
=
_delta_max
;
stats
.
setLabel
(
code
);
}
...
...
@@ -64,24 +59,11 @@ Germline::Germline(string _code, char _shortcut,
Fasta
_rep_5
,
Fasta
_rep_4
,
Fasta
_rep_3
,
int
_delta_min
,
int
_delta_max
)
{
code
=
_code
;
shortcut
=
_shortcut
;
index
=
0
;
// affect_5 = KmerAffect("", "V", 0) ;
// affect_3 = KmerAffect("", "J", 0) ;
affect_5
=
"V"
;
affect_4
=
""
;
affect_3
=
"J"
;
init
(
_code
,
_shortcut
,
_delta_min
,
_delta_max
);
rep_5
=
_rep_5
;
rep_4
=
_rep_4
;
rep_3
=
_rep_3
;
delta_min
=
_delta_min
;
delta_max
=
_delta_max
;
stats
.
setLabel
(
code
);
}
void
Germline
::
new_index
(
string
seed
)
...
...
algo/core/germline.h
View file @
ee77c411
...
...
@@ -12,6 +12,9 @@ using namespace std;
class
Germline
{
private:
void
init
(
string
_code
,
char
_shortcut
,
int
_delta_min
,
int
_delta_max
);
void
update_index
();
public:
...
...
Write
Preview
Markdown
is supported
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