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
1bc0e724
Commit
1bc0e724
authored
Jun 20, 2016
by
Mikaël Salson
Committed by
HERBERT Ryan
Jun 27, 2016
Browse files
algo: Remove compilation warnings due to signed/unsigned comparisons
parent
bb9220f6
Changes
6
Hide whitespace changes
Inline
Side-by-side
algo/cgi/similarity.cpp
View file @
1bc0e724
...
...
@@ -117,7 +117,7 @@ int main(int argc, char* argv[])
reads
=
fa
.
getAll
();
list
<
string
>
labels
;
for
(
in
t
i
=
0
;
i
<
reads
.
size
();
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
reads
.
size
();
i
++
)
{
labels
.
push_back
(
fa
.
label
(
i
));
}
...
...
algo/core/fasta.cpp
View file @
1bc0e724
...
...
@@ -39,7 +39,7 @@ unsigned long long filesize(const char* filename)
return
in
.
tellg
();
}
void
Fasta
::
init
(
int
extract_field
,
string
extract_separator
,
in
t
mark_pos
)
void
Fasta
::
init
(
int
extract_field
,
string
extract_separator
,
size_
t
mark_pos
)
{
this
->
extract_field
=
extract_field
;
this
->
extract_separator
=
extract_separator
;
...
...
@@ -108,7 +108,7 @@ void Fasta::add(Sequence seq) {
}
int
Fasta
::
size
()
const
{
return
(
int
)
reads
.
size
();
}
in
t
Fasta
::
totalSize
()
const
{
return
total_size
;
}
size_
t
Fasta
::
totalSize
()
const
{
return
total_size
;
}
list
<
Sequence
>
Fasta
::
getAll
()
const
{
list
<
Sequence
>
reads
;
...
...
@@ -235,7 +235,7 @@ void OnlineFasta::addLineToCurrentSequence(string line)
current
.
sequence
+=
c
;
if
(
mark_pos
)
{
if
(
current
.
sequence
.
length
()
+
current_gaps
==
mark_pos
)
if
(
(
int
)
current
.
sequence
.
length
()
+
current_gaps
==
mark_pos
)
current
.
marked_pos
=
current
.
sequence
.
length
();
}
}
...
...
algo/core/fasta.h
View file @
1bc0e724
...
...
@@ -17,7 +17,7 @@ typedef struct read_t
string
sequence
;
// Sequence: original string representation
string
quality
;
int
*
seq
;
// Sequence: seq representation
in
t
marked_pos
;
// Some marked position in the sequence
size_
t
marked_pos
;
// Some marked position in the sequence
}
Sequence
;
typedef
enum
{
...
...
@@ -32,9 +32,9 @@ unsigned long long filesize(const char* filename);
class
Fasta
{
void
init
(
int
extract_field
,
string
extract_separator
,
in
t
mark_pos
=
0
);
void
init
(
int
extract_field
,
string
extract_separator
,
size_
t
mark_pos
=
0
);
in
t
total_size
;
size_
t
total_size
;
int
extract_field
;
int
mark_pos
;
string
extract_separator
;
...
...
@@ -59,7 +59,7 @@ public:
string
name
;
string
basename
;
int
size
()
const
;
in
t
totalSize
()
const
;
size_
t
totalSize
()
const
;
/**
* Get all the sequences from the FASTA file
...
...
algo/core/kmerstore.h
View file @
1bc0e724
...
...
@@ -44,7 +44,7 @@ protected:
int
s
;
// span of the seed (s >= k)
string
seed
;
size_t
nb_kmers_inserted
;
in
t
max_size_indexing
;
size_
t
max_size_indexing
;
public:
...
...
algo/core/segment.cpp
View file @
1bc0e724
...
...
@@ -103,7 +103,7 @@ string AlignBox::refToString(int from, int to) {
if
(
i
==
start
)
s
<<
color
;
if
(
j
>
0
&&
j
<=
ref
.
size
())
if
(
j
>
0
&&
(
size_t
)
j
<=
ref
.
size
())
s
<<
ref
[
j
-
1
]
;
else
s
<<
"."
;
...
...
@@ -684,7 +684,7 @@ string check_and_resolve_overlap(string seq, int seq_begin, int seq_end,
int
trim_l
[
overlap
+
1
];
int
trim_r
[
overlap
+
1
];
for
(
in
t
i
=
0
;
i
<=
overlap
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<=
(
size_t
)
overlap
;
i
++
)
{
score_l
[
i
]
=
i
<
seq_left
.
size
()
?
dp_l
.
best_score_on_i
(
seq_left
.
size
()
-
i
,
trim_l
+
i
)
:
MINUS_INF
;
score_r
[
i
]
=
i
<
seq_right
.
size
()
?
dp_r
.
best_score_on_i
(
seq_right
.
size
()
-
i
,
trim_r
+
i
)
:
MINUS_INF
;
}
...
...
algo/core/tools.cpp
View file @
1bc0e724
...
...
@@ -139,7 +139,7 @@ int dna_to_int(const string &word, int size) {
string
nuc_to_aa
(
const
string
&
word
)
{
string
aa
;
int
index_word
=
0
;
in
t
i
=
0
;
size_
t
i
=
0
;
for
(;
i
<
word
.
length
()
;
i
++
)
{
index_word
=
(
index_word
<<
2
)
|
nuc_to_int
(
word
[
i
]);
...
...
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