Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
0dc21dce
Commit
0dc21dce
authored
Jun 14, 2018
by
Cyprien Borée
Committed by
Mikaël Salson
Jun 15, 2018
Browse files
Fix filter method in algo/filter.cpp
For more informations see issue
#3279
parent
077c61de
Pipeline
#28619
passed with stages
in 29 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
algo/core/filter.cpp
View file @
0dc21dce
...
...
@@ -93,10 +93,12 @@ BioReader filterBioReaderWithACAutomaton(
int
nbKmers
=
0
,
previousOccurences
=
0
;
for
(
pair
<
KmerAffect
,
int
>
element
:
setOfWords
){
// Add corresponding sequences to the BioReader
if
(
nbKmers
<=
kmer_threshold
){
nbKmers
++
;
if
(
nbKmers
==
kmer_threshold
&&
previousOccurences
==
element
.
second
){
nbKmers
--
;
//Keep the same amount of genes
}
else
if
(
nbKmers
<
kmer_threshold
){
nbKmers
++
;
}
else
{
break
;
}
tmpKmer
=
element
.
first
;
asciiChar
=
tmpKmer
.
getLabel
().
at
(
0
);
...
...
@@ -108,11 +110,6 @@ BioReader filterBioReaderWithACAutomaton(
result
.
add
(
origin
.
read
(
i
));
}
previousOccurences
=
element
.
second
;
}
else
{
/* Enough K-mers used for filtering, no need to go further */
break
;
}
}
}
return
(
result
.
size
()
==
0
)
?
origin
:
result
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment