Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vihgo
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
vihgo
Commits
3de107cf
Commit
3de107cf
authored
Apr 23, 2020
by
Yannis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implementation of reference, genes and annotations reading
parent
d31f85e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
6 deletions
+52
-6
Vihgo.h
cpp/Vihgo.h
+15
-5
main.cpp
cpp/main.cpp
+1
-1
utils.cpp
cpp/utils.cpp
+36
-0
No files found.
cpp/Vihgo.h
100644 → 100755
View file @
3de107cf
...
...
@@ -9,16 +9,23 @@ class Vihgo
{
public
:
Vihgo
();
Vihgo
(
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
int
,
int
,
int
,
double
,
double
,
bool
);
Vihgo
(
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
std
::
string
,
int
,
int
,
int
,
double
,
double
,
bool
);
int
mainLoop
();
int
getGenome
();
int
getGenes
();
int
getAnnotation
();
int
readRunControl
();
bool
isAnnotationDefined
();
std
::
vector
<
std
::
string
>
getAnnotationFiles
();
private
:
private
:
std
::
string
sampleName
;
std
::
string
inputBamFile
;
std
::
string
integraseFile
;
std
::
string
proteaseFile
;
std
::
string
retrotranscriptaseFile
;
std
::
string
referenceFile
;
std
::
string
outputFile
;
std
::
string
codonResultFile
;
...
...
@@ -34,10 +41,13 @@ class Vihgo
double
pvalueThreshold
;
bool
countStop
;
bool
annotationIsOk
;
std
::
map
<
std
::
string
,
std
::
map
<
int
,
char
>>
referenceSequence
;
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
string
>>
genes
;
std
::
map
<
std
::
string
,
std
::
map
<
int
,
std
::
string
>>
referenceCodon
;
std
::
map
<
std
::
string
,
std
::
map
<
int
,
char
>
>
referenceSequence
;
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
string
>
>
genes
;
std
::
map
<
std
::
string
,
std
::
map
<
int
,
std
::
string
>
>
referenceCodon
;
std
::
map
<
std
::
string
,
std
::
map
<
int
,
std
::
string
>
>
protCodon
;
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
string
>
>
knownMutationTable
;
// method
void
displayGenome
();
...
...
cpp/main.cpp
100644 → 100755
View file @
3de107cf
...
...
@@ -178,7 +178,7 @@ int main(int argc, char* argv[])
}
Vihgo
*
App
=
new
Vihgo
(
bamFile
,
geneFile
,
integraseFile
,
proteaseFile
,
referenceFile
,
outputFile
,
codonResultFile
,
csFile
,
inRunControlBam
,
depthThreshold
,
nbThread
,
loggingLevel
,
ratioThreshold
,
pvalueThreshold
,
countStop
);
Vihgo
*
App
=
new
Vihgo
(
bamFile
,
geneFile
,
rtFile
,
integraseFile
,
proteaseFile
,
referenceFile
,
outputFile
,
codonResultFile
,
csFile
,
inRunControlBam
,
depthThreshold
,
nbThread
,
loggingLevel
,
ratioThreshold
,
pvalueThreshold
,
countStop
);
App
->
mainLoop
();
...
...
cpp/utils.cpp
100644 → 100755
View file @
3de107cf
...
...
@@ -4,6 +4,7 @@
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <cstring>
#include <sys/time.h>
#include <sys/types.h>
...
...
@@ -77,11 +78,46 @@ string char_to_string(char incoming)
return
s
;
}
vector
<
string
>
parseOnSep
(
string
inc
,
string
sep
)
{
vector
<
string
>
ret
;
istringstream
issInc
(
inc
);
string
mot
;
while
(
getline
(
issInc
,
mot
,
string_to_char
(
sep
)
)
)
{
ret
.
push_back
(
mot
);
}
return
ret
;
}
char
string_to_char
(
string
inc
)
{
char
cstr
[
inc
.
size
()
+
1
];
inc
.
copy
(
cstr
,
inc
.
size
()
+
1
);
cstr
[
inc
.
size
()]
=
'\0'
;
return
*
cstr
;
}
string
strip
(
string
inc
)
{
cerr
<<
"Passing into strip << "
<<
inc
;
string
::
size_type
pos
=
0
;
while
(
(
pos
=
inc
.
find
(
"
\n
"
,
pos
)
)
!=
string
::
npos
)
{
cerr
<<
" ; pos = "
<<
pos
;
inc
.
erase
(
pos
,
2
);
}
cerr
<<
" to "
<<
inc
<<
endl
;
return
inc
;
}
...
...
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