Skip to content

Commit

Permalink
[cluster] Make passRatio a bit more stringent
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Sep 4, 2018
1 parent a0cf7d3 commit 4d7935d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ func (r *Partitioner) setClusters(clusterID []int) {
// linkage.cID, r.clusters[linkage.cID])
// }

passRatio := len(linkages) == 1 || (linkages[0].avgLinkage > 0 && linkages[1].avgLinkage == 0) ||
linkages[0].avgLinkage/linkages[1].avgLinkage >= NonInformativeRatio
passRatio := linkages[0].avgLinkage >= NonInformativeRatio &&
(len(linkages) == 1 || linkages[1].avgLinkage == 0 ||
linkages[0].avgLinkage/linkages[1].avgLinkage >= NonInformativeRatio)
if !passRatio {
nFailRatio++
continue
Expand Down
4 changes: 2 additions & 2 deletions partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (r *Partitioner) getRE() string {
// This reads in the `counts_RE.txt` file generated by extract()
func (r *Partitioner) skipContigsWithFewREs() {
RE := r.getRE()
MinREs := 32
MinREs := 8
switch len(RE) {
case 4:
MinREs = 32 // 32 * (4 ** 4) = 8Kb
Expand All @@ -82,7 +82,7 @@ func (r *Partitioner) skipContigsWithFewREs() {
case 6:
MinREs = 8 // 8 * (4 ** 6) = 32Kb
default:
MinREs = 10 // We normally only use RE between 4 to 6 base cutter, but just in case
MinREs = 8 // We normally only use RE between 4 to 6 base cutter, but just in case
}
log.Noticef("skipContigsWithFewREs with MinREs = %d (RE = %s)", MinREs, RE)
nShort := 0
Expand Down

0 comments on commit 4d7935d

Please sign in to comment.