Drop tiles with no-calls.
authorTom Clegg <tom@tomclegg.ca>
Fri, 17 Jan 2020 19:03:29 +0000 (14:03 -0500)
committerTom Clegg <tom@tomclegg.ca>
Fri, 17 Jan 2020 19:03:29 +0000 (14:03 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

tilelib.go

index 8d4afa0f6965180f2b328bf18d3bdb72a7ab79fc..51f5fdc574d473c5b95ad6ad65c32f0fc5c113d7 100644 (file)
@@ -86,6 +86,13 @@ func (tilelib *tileLibrary) Len() int {
 // Return a tileLibRef for a tile with the given tag and sequence,
 // adding the sequence to the library if needed.
 func (tilelib *tileLibrary) getRef(tag tagID, seq []byte) tileLibRef {
+       for _, b := range seq {
+               if b != 'a' && b != 'c' && b != 'g' && b != 't' {
+                       // return "tile not found" if seq has any
+                       // no-calls
+                       return tileLibRef{tag: tag}
+               }
+       }
        tilelib.mtx.Lock()
        defer tilelib.mtx.Unlock()
        // if tilelib.seq == nil {