| 1 | // Copyright ©2011-2012 The bíogo Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package filterscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/ |
| 6 | |
| 7 | // Type to store individual q-gram query filter hits. |
| 8 | type Hitscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit# struct { |
| 9 | Fromscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#From. int |
| 10 | Toscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#To. int |
| 11 | Diagonalscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#Diagonal. int |
| 12 | } |
| 13 | |
| 14 | // This is a direct translation of the qsort compar function used by PALS. |
| 15 | // However it results in a different sort order (with respect to the non-key |
| 16 | // fields) for Hits because of differences in the underlying sort algorithms |
| 17 | // and their respective sort stability. |
| 18 | // This appears to have some impact on Hit merging. |
| 19 | func (h Hitscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#) Lessscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#Less().(y interface{}) bool { |
| 20 | return h.Fromscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#From. < y.(Hitscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#).Fromscip-go gomod github.com/biogo/biogo . `github.com/biogo/biogo/align/pals/filter`/Hit#From. |
| 21 | } |