Commit 2c6e657f authored by Mikael Salson's avatar Mikael Salson

algo/core: reindent

parent 7675f014
Pipeline #16530 passed with stages
in 26 minutes and 41 seconds
......@@ -289,7 +289,7 @@ string KmerAffectAnalyser::toString() const{
}
string KmerAffectAnalyser::toStringValues() const{
string kmer;
string kmer;
for (size_t i = 0; i < affectations.size(); i++) {
kmer += affectations[i].toStringValues();
}
......
......@@ -88,8 +88,8 @@ void comp_matrix::load(string file){
for(unsigned int i=0; i<sort_clones.size();i++){
in_comp.read(tampon, sort_clones.size()*sizeof(char));
for(unsigned int j=0;j<sort_clones.size(); j++){
m[i][j]=tampon[j];
}
m[i][j]=tampon[j];
}
}
free(tampon);
......@@ -157,25 +157,25 @@ list<list<junction> > comp_matrix::cluster(string forced_edges, int w, ostream
size_t j = 0;
for (list <pair<junction,size_t> >::const_iterator it1 = sort_clones.begin();
(it1 != sort_clones.end()) & (j<matrix_size); ++it1)
{
j++;
j2=it1->first;
int distance = (int)m[c2][c1];
(it1 != sort_clones.end()) & (j<matrix_size); ++it1)
{
j++;
j2=it1->first;
int distance = (int)m[c2][c1];
if (distance <= epsilon){
if (distance <= epsilon){
neighbor[j1].push_back(j2);
}
c1++;
c++;
}
c1++;
c++;
}//fin it1
c2++;
c1=0;
}//fin it0
c2++;
c1=0;
}//fin it0
/////////////////////////
//Forced - edges
if (forced_edges.size())
/////////////////////////
//Forced - edges
if (forced_edges.size())
{
ifstream fe(forced_edges.c_str());
......@@ -243,7 +243,7 @@ list<list<junction> > comp_matrix::cluster(string forced_edges, int w, ostream
nVoisins=0;
for (list<string>::iterator it1 = voisins1.begin();
it1 != voisins1.end(); ++it1 ) nVoisins+=count[*it1];
it1 != voisins1.end(); ++it1 ) nVoisins+=count[*it1];
if (nVoisins<minPts){
//noise
......@@ -268,7 +268,7 @@ list<list<junction> > comp_matrix::cluster(string forced_edges, int w, ostream
nVoisins=0;
for (list<string>::iterator it1 = voisins2.begin();it1 != voisins2.end();
++it1 )nVoisins+=count[*it1];
++it1 )nVoisins+=count[*it1];
//si la junction possede assez de voisins
if (nVoisins>=minPts){
//on ajoute ses voisins a la liste des voisins du cluster
......@@ -308,9 +308,9 @@ list<list<junction> > comp_matrix::cluster(string forced_edges, int w, ostream
list< string > c2;
for (list< pair<int,string> >::iterator c_it = c.begin(); c_it != c.end();
++c_it ){
++c_it ){
pair<int,string> pair=*c_it;
c2.push_back(pair.second);
c2.push_back(pair.second);
}
c2.reverse();
cluster.push_back(c2);
......
......@@ -38,7 +38,7 @@ SimilarityMatrix compare_all(list <Sequence> sequences,
for (list <Sequence>::const_iterator it1 = sequences.begin();
it1 != sequences.end(); ++it1 )
num = 0 ;
num = 0 ;
list<string>::const_iterator itLabel = sequence_names.begin();
for (list <Sequence>::const_iterator it1 = sequences.begin();
......
......@@ -294,26 +294,26 @@ bool KmerRepresentativeComputer::tryToExtendRepresentative(const vector<Kmer> co
else
pos_of_interest = i - 1;
if (pos_of_interest < (int) counts[current_seed].size() && pos_of_interest >= 0) {
if (isSufficienlyExpressed(counts[current_seed][pos_of_interest].count, sequences.size())) {
i += direction;
if (nb_seeds > 1) {
size_t seed_length = seeds[current_seed].size();
for (size_t pos = 0; pos < seed_length; pos++) {
bool previous_cover = cover[pos_of_interest+pos];
cover[pos_of_interest+pos] |= (seeds[current_seed][pos] == '#');
if (! previous_cover && cover[pos_of_interest+pos])
length_cover++;
}
} else {
int pos_modif = (direction == -1) ? pos_of_interest : i;
if (!cover[pos_modif])
length_cover++;
cover[pos_modif] = true;
if (isSufficienlyExpressed(counts[current_seed][pos_of_interest].count, sequences.size())) {
i += direction;
if (nb_seeds > 1) {
size_t seed_length = seeds[current_seed].size();
for (size_t pos = 0; pos < seed_length; pos++) {
bool previous_cover = cover[pos_of_interest+pos];
cover[pos_of_interest+pos] |= (seeds[current_seed][pos] == '#');
if (! previous_cover && cover[pos_of_interest+pos])
length_cover++;
}
} else {
int pos_modif = (direction == -1) ? pos_of_interest : i;
if (!cover[pos_modif])
length_cover++;
cover[pos_modif] = true;
}
was_extended = true;
}
was_extended = true;
}
}
}
return was_extended;
......
......@@ -1085,8 +1085,8 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
box_J->end = sequence.length()-1;
// Why could this happen ?
if (box_J->start>=(int) sequence.length())
box_J->start=sequence.length()-1;
if (box_J->start>=(int) sequence.length())
box_J->start=sequence.length()-1;
// seg_N will be recomputed in finishSegmentation()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment