Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnvCallerGPU
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gad-public
cnvCallerGPU
Commits
731e5baf
Commit
731e5baf
authored
Mar 04, 2025
by
Yannis Duffourd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first implementation
parent
3b7da2fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
121 additions
and
0 deletions
+121
-0
main.cpp
main.cpp
+121
-0
No files found.
main.cpp
View file @
731e5baf
// C++ std libs
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <sys/time.h>
#include <sys/types.h>
// C++ Boost
#include <boost/program_options.hpp>
// utils
#include "utils.h"
// Classes
#include "Galacs.h"
using
namespace
std
;
namespace
po
=
boost
::
program_options
;
int
main
(
int
argc
,
char
*
argv
[])
{
cerr
<<
"Starting Main"
<<
endl
;
int
currentThread
=
0
;
int
nbThread
=
1
;
int
loggingLevel
;
int
window
;
int
step
;
double
ratioThreshold
;
double
pvalueThreshold
;
double
zscore
;
string
bamFile
;
string
outputFile
;
string
outputFilePairs
;
string
outputFileSplits
;
string
logFile
;
string
referenceFile
;
po
::
options_description
desc
(
"Allowed options"
);
desc
.
add_options
()
(
"help,h"
,
"produce help message"
)
(
"input,i"
,
po
::
value
<
string
>
(
&
bamFile
),
"Input BAM file containing aligned read from sample."
)
(
"output,o"
,
po
::
value
<
string
>
(
&
outputFile
),
"output result file variants."
)
(
"outputPairs,p"
,
po
::
value
<
string
>
(
&
outputFilePairs
),
"output result file containing discordant pairs."
)
(
"outputSplits,S"
,
po
::
value
<
string
>
(
&
outputFileSplits
),
"output result file containing split read."
)
(
"logFile,l"
,
po
::
value
<
string
>
(
&
logFile
),
"Log file output."
)
(
"reference,r"
,
po
::
value
<
string
>
(
&
referenceFile
)
,
"Reference Fasta file."
)
(
"window,w"
,
po
::
value
<
int
>
(
&
window
)
->
default_value
(
50
),
"Depth treshold to call a variant. (optional)"
)
(
"step,s"
,
po
::
value
<
int
>
(
&
step
)
->
default_value
(
0.1
)
,
"Minimum ratio of alt reads to consider a mutation. (optional)"
)
(
"zscore,z"
,
po
::
value
<
double
>
(
&
zscore
)
->
default_value
(
0.05
)
,
"pvalue threshold from FET to consider a mutation. (optional)"
)
(
"thread,t"
,
po
::
value
<
int
>
(
&
nbThread
)
->
default_value
(
50
),
"Number of thread to use. (NYI)"
)
(
"loglevel,L"
,
po
::
value
<
int
>
(
&
loggingLevel
)
->
default_value
(
1
),
"Logging level."
);
po
::
variables_map
vm
;
po
::
store
(
po
::
parse_command_line
(
argc
,
argv
,
desc
),
vm
);
po
::
notify
(
vm
);
// Verif que le nb de thread n'est pas négatif ...
if
(
nbThread
<
1
)
{
nbThread
=
1
;
cerr
<<
"You entered a null or negative value for thread number, positionning it to 1. "
<<
endl
;
}
if
(
argc
<=
1
)
{
cerr
<<
"Error while checking program arguments"
<<
endl
;
cerr
<<
desc
<<
"
\n
"
;
return
1
;
}
// check provided files
if
(
bamFile
.
length
(
)
>
0
)
{
if
(
!
IsFileReadable
(
bamFile
)
)
{
cerr
<<
"File provided as input BAM : "
<<
bamFile
<<
" is not accessible : stopping"
<<
endl
;
return
-
1
;
}
}
else
{
cerr
<<
"No file provided as input BAM file : stopping"
<<
endl
;
return
-
1
;
}
if
(
referenceFile
.
length
(
)
>
0
)
{
if
(
!
IsFileReadable
(
referenceFile
)
)
{
cerr
<<
"File provided as reference : "
<<
referenceFile
<<
" is not accessible : stopping"
<<
endl
;
return
-
1
;
}
}
else
{
cerr
<<
"No file provided as reference file : stopping"
<<
endl
;
return
-
1
;
}
Galacs
*
App
=
new
Galacs
(
bamFile
,
referenceFile
,
outputFile
,
outputFilePairs
,
outputFileSplits
,
window
,
step
,
zscore
,
nbThread
,
loggingLevel
);
App
->
mainLoop
();
delete
App
;
cerr
<<
"end of main"
<<
endl
;
return
0
;
}
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