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,711
Issues
1,711
List
Boards
Labels
Service Desk
Milestones
Merge Requests
86
Merge Requests
86
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
11c7f2ba
Commit
11c7f2ba
authored
Feb 11, 2021
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vidjil.cpp: -c detect, ending before unnecessary steps
parent
83a701e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
algo/vidjil.cpp
algo/vidjil.cpp
+19
-7
No files found.
algo/vidjil.cpp
View file @
11c7f2ba
...
...
@@ -86,12 +86,13 @@
#define DEFAULT_RATIO_READS_CLONE 0.0
#define NO_LIMIT "all"
#define COMMAND_DETECT "detect"
#define COMMAND_WINDOWS "windows"
#define COMMAND_CLONES "clones"
#define COMMAND_SEGMENT "designations"
#define COMMAND_GERMLINES "germlines"
enum
{
CMD_WINDOWS
,
CMD_CLONES
,
CMD_SEGMENT
,
CMD_GERMLINES
}
;
enum
{
CMD_
DETECT
,
CMD_
WINDOWS
,
CMD_CLONES
,
CMD_SEGMENT
,
CMD_GERMLINES
}
;
#define DEFAULT_OUT_DIR "./out/"
...
...
@@ -270,8 +271,10 @@ int main (int argc, char **argv)
string
cmd
=
COMMAND_CLONES
;
app
.
add_option
(
"-c"
,
cmd
,
"command"
"
\n
\t\t
"
COMMAND_CLONES
"
\t
locus detection, window extraction, clone clustering (default command, most efficient, all outputs)"
"
\n
\t\t
"
COMMAND_WINDOWS
"
\t
locus detection, window extraction"
"
\n
\t\t
"
COMMAND_DETECT
"
\t
locus detection"
"
\n
\t\t
"
COMMAND_SEGMENT
"
\t
detailed V(D)J designation, without prior clustering (not as efficient)"
"
\n
\t\t
"
COMMAND_GERMLINES
"
\t
statistics on k-mers in different germlines"
)
->
group
(
group
)
->
type_name
(
"COMMAND"
);
...
...
@@ -631,16 +634,14 @@ int main (int argc, char **argv)
app
.
add_flag_function
(
"--filter-reads"
,
[
&
](
int
n
)
{
UNUSED
(
n
);
cmd
=
COMMAND_
WINDOWS
;
cmd
=
COMMAND_
DETECT
;
output_segmented
=
true
;
expected_value
=
EVALUE_FILTER_READS
;
multi_germline_unexpected_recombinations_12
=
true
;
max_representatives
=
0
;
max_clones
=
0
;
return
true
;
},
"filter possibly huge datasets, with a permissive threshold, to extract reads that may have V(D)J recombinations"
PAD_HELP
"(equivalent to -c "
COMMAND_
WINDOWS
" --out-detected --e-value "
STR
(
EVALUE_FILTER_READS
)
" -2 --max-consensus 0
)"
)
PAD_HELP
"(equivalent to -c "
COMMAND_
DETECT
" --out-detected --e-value "
STR
(
EVALUE_FILTER_READS
)
" -2
)"
)
->
group
(
group
);
app
.
add_option
(
"--grep-reads"
,
...
...
@@ -689,6 +690,11 @@ int main (int argc, char **argv)
command
=
CMD_CLONES
;
else
if
(
cmd
==
COMMAND_SEGMENT
)
command
=
CMD_SEGMENT
;
else
if
(
cmd
==
COMMAND_DETECT
)
{
command
=
CMD_DETECT
;
no_airr
=
true
;
no_vidjil
=
true
;
}
else
if
(
cmd
==
COMMAND_WINDOWS
)
command
=
CMD_WINDOWS
;
else
if
(
cmd
==
COMMAND_GERMLINES
)
...
...
@@ -807,7 +813,7 @@ int main (int argc, char **argv)
json
j_labels
=
load_into_map_from_json
(
windows_labels
,
windows_labels_json
);
switch
(
command
)
{
case
CMD_
WINDOWS
:
cout
<<
"Extracting windows"
<<
endl
;
case
CMD_
DETECT
:
cout
<<
"Detecting V(D)J recombinations"
<<
endl
;
break
;
case
CMD_CLONES
:
cout
<<
"Analysing clones"
<<
endl
;
break
;
...
...
@@ -1126,7 +1132,7 @@ int main (int argc, char **argv)
////////////////////////////////////////
// CLONE ANALYSIS //
////////////////////////////////////////
if
(
command
==
CMD_CLONES
||
command
==
CMD_WINDOWS
)
{
if
(
command
==
CMD_CLONES
||
command
==
CMD_WINDOWS
||
command
==
CMD_DETECT
)
{
//////////////////////////////////
//$$ Kmer Segmentation
...
...
@@ -1236,6 +1242,10 @@ int main (int argc, char **argv)
cout
<<
stream_segmentation_info
.
str
();
// CMD_DETECT stops here
if
(
command
==
CMD_CLONES
||
command
==
CMD_WINDOWS
)
{
//////////////////////////////////
//$$ Sort windows
...
...
@@ -1321,6 +1331,7 @@ int main (int argc, char **argv)
cout
<<
"No clustering"
<<
endl
;
}
// CMD_WINDOWS stops here
//$$ Further analyze some clones (-z)
if
(
command
==
CMD_CLONES
)
{
...
...
@@ -1754,6 +1765,7 @@ int main (int argc, char **argv)
if
(
jsonLevenshteinComputed
)
output
.
set
(
"similarity"
,
jsonLevenshtein
);
}
// end if (command == CMD_CLONES) || (command == CMD_WINDOWS)
//$$ Clean
...
...
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