Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,412
Issues
1,412
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
bd85dcd0
Commit
bd85dcd0
authored
Jul 10, 2018
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vidjil.cpp: --max-clones, limit clones both on stdout and on json output
Closes
#3347
. See also
#3302
.
parent
d9ddc010
Pipeline
#32401
failed with stages
in 13 minutes and 35 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
algo/vidjil.cpp
algo/vidjil.cpp
+21
-8
No files found.
algo/vidjil.cpp
View file @
bd85dcd0
...
...
@@ -398,9 +398,11 @@ int main (int argc, char **argv)
// ----------------------------------------------------------------------------------------------------------------------
group
=
"Limits to report a clone (or a window)"
;
int
max_clones_id
=
NO_LIMIT_VALUE
;
int
min_reads_clone
=
DEFAULT_MIN_READS_CLONE
;
float
ratio_reads_clone
=
DEFAULT_RATIO_READS_CLONE
;
app
.
add_option
(
"--max-clones"
,
max_clones_id
,
"maximal number of output clones ('"
NO_LIMIT
"': no maximum, default)"
,
false
)
->
group
(
group
);
app
.
add_option
(
"-r"
,
min_reads_clone
,
"minimal number of reads supporting a clone"
,
true
)
->
group
(
group
);
app
.
add_option
(
"--ratio"
,
ratio_reads_clone
,
"minimal percentage of reads supporting a clone"
,
true
)
->
group
(
group
);
...
...
@@ -1259,14 +1261,25 @@ int main (int argc, char **argv)
string
label
=
windowsStorage
->
getLabel
(
it
->
first
);
string
window_str
=
">"
+
clone_id
+
"--window"
+
" "
+
label
+
'\n'
+
it
->
first
+
'\n'
;
//$$ If max_representatives is reached, we stop here but still outputs the window
if
((
max_representatives
>=
0
)
&&
(
num_clone
>=
max_representatives
+
1
)
&&
!
windowsStorage
->
isInterestingJunction
(
it
->
first
))
// interesting junctions are always handled
if
(
!
windowsStorage
->
isInterestingJunction
(
it
->
first
))
{
// If max_clones is reached, we stop here
if
((
max_clones_id
>=
0
)
&&
(
num_clone
>=
max_clones_id
+
1
))
{
cout
<<
"STOP"
<<
endl
;
continue
;
}
// If max_representatives is reached, we stop here but still outputs the window
if
((
max_representatives
>=
0
)
&&
(
num_clone
>=
max_representatives
+
1
))
{
out_clones
<<
window_str
<<
endl
;
continue
;
}
}
cout
<<
clone_id_human
<<
endl
;
...
...
@@ -1496,7 +1509,7 @@ int main (int argc, char **argv)
//json->add("links", jsonLevenshtein);
//out_json << json->toString();
json
jsonSortedWindows
=
windowsStorage
->
sortedWindowsToJson
(
json_data_segment
);
json
jsonSortedWindows
=
windowsStorage
->
sortedWindowsToJson
(
json_data_segment
,
max_clones_id
);
json
reads_germline
;
for
(
list
<
Germline
*>::
const_iterator
it
=
multigermline
->
germlines
.
begin
();
it
!=
multigermline
->
germlines
.
end
();
++
it
){
...
...
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