Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
cfab6ef1
Commit
cfab6ef1
authored
May 16, 2014
by
Vidjil Team
Browse files
vidjil.cpp: -c germlines, display % of k-mers
parent
900a8818
Changes
1
Show whitespace changes
Inline
Side-by-side
algo/vidjil.cpp
View file @
cfab6ef1
...
...
@@ -627,11 +627,15 @@ int main (int argc, char **argv)
// Loop through all reads
int
nb_reads
=
0
;
int
total_length
=
0
;
int
s
=
index
->
getS
();
while
(
reads
->
hasNext
())
{
reads
->
next
();
nb_reads
++
;
string
seq
=
reads
->
getSequence
().
sequence
;
total_length
+=
seq
.
length
()
-
s
;
KmerAffectAnalyser
<
KmerStringAffect
>
*
kaa
=
new
KmerAffectAnalyser
<
KmerStringAffect
>
(
*
index
,
seq
);
...
...
@@ -660,10 +664,12 @@ int main (int argc, char **argv)
cout
<<
" <== "
<<
nb_reads
<<
" reads"
<<
endl
;
for
(
list
<
char
*
>::
const_iterator
it
=
f_germlines
.
begin
();
it
!=
f_germlines
.
end
();
++
it
)
{
cout
<<
setw
(
12
)
<<
stats_kmer
[
*
it
]
<<
"
\t
"
<<
*
it
<<
endl
;
cout
<<
setw
(
12
)
<<
stats_kmer
[
*
it
]
<<
"
\t
"
;
cout
<<
setw
(
6
)
<<
fixed
<<
setprecision
(
2
)
<<
(
float
)
stats_kmer
[
*
it
]
/
total_length
*
100
<<
"%
\t
"
;
cout
<<
*
it
<<
endl
;
}
cout
<<
setw
(
12
)
<<
stats_kmer
[
KMER_AMBIGUOUS
]
<<
"
\t
"
<<
KMER_AMBIGUOUS
<<
endl
;
cout
<<
setw
(
12
)
<<
stats_kmer
[
KMER_UNKNOWN
]
<<
"
\t
"
<<
KMER_UNKNOWN
<<
endl
;
cout
<<
setw
(
12
)
<<
stats_kmer
[
KMER_AMBIGUOUS
]
<<
"
\t
"
<<
"
\t
"
<<
KMER_AMBIGUOUS
<<
endl
;
cout
<<
setw
(
12
)
<<
stats_kmer
[
KMER_UNKNOWN
]
<<
"
\t
"
<<
"
\t
"
<<
KMER_UNKNOWN
<<
endl
;
exit
(
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