Skip to content

Commit

Permalink
Removed the reporting again.
Browse files Browse the repository at this point in the history
  • Loading branch information
stela2502 committed Nov 14, 2023
1 parent 2678d8d commit ad03494
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions this/src/fast_mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,21 +356,21 @@ impl FastMapper{
fn get_best_gene( &self, genes:&HashMap::<(usize, usize), usize>, ret: &mut Vec::<usize> ) -> bool{
ret.clear();

let mut report = false;
if genes.len() > 2{
report = true;
eprintln!("Lots of genes matched here?: {genes:?}");
for (gene_id, _level) in genes.keys(){
eprint!(" {}", self.names_store[*gene_id] );
}
eprint!("\n");
}
// let mut report = false;
// if genes.len() > 2{
// report = true;
// eprintln!("Lots of genes matched here?: {genes:?}");
// for (gene_id, _level) in genes.keys(){
// eprint!(" {}", self.names_store[*gene_id] );
// }
// eprint!("\n");
// }
if genes.len() == 1 {
if let Some((key, _)) = genes.iter().next() {
ret.push(key.0.clone());
if report {
eprintln!("1 This was selected as good: {} or {}\n",key.0, self.names_store[key.0] )
}
// if report {
// eprintln!("1 This was selected as good: {} or {}\n",key.0, self.names_store[key.0] )
// }
return true
}
}
Expand All @@ -391,9 +391,9 @@ impl FastMapper{
}
if good.len() ==1 {
ret.push( good[0] );
if report {
eprintln!("2 This was selected as good: {} or {}\n",good[0], self.names_store[good[0]] )
}
// if report {
// eprintln!("2 This was selected as good: {} or {}\n",good[0], self.names_store[good[0]] )
// }
return true
}

Expand All @@ -410,18 +410,18 @@ impl FastMapper{
if good.len() == 2{
if remove_suffix_string_int( &self.names_store[good[0]] ) == remove_suffix_string_int( &self.names_store[good[1]] ){
ret.push( self.get_id(remove_suffix_string_int( &self.names_store[good[0]] ) ) );
if report {
eprintln!("4 This was selected as good: {} or {}\n",best_gene, ret[ret.len()-1] )
}
// if report {
// eprintln!("4 This was selected as good: {} or {}\n", ret[ret.len()-1] &self.names_store[ret[ret.len()-1]] )
// }
return true
}
}


}
if report {
eprintln!("! No good gene identified!\n" )
}
// if report {
// eprintln!("! No good gene identified!\n" )
// }
return false

}
Expand Down

0 comments on commit ad03494

Please sign in to comment.