X-Git-Url: https://git.arvados.org/lightning.git/blobdiff_plain/395c842444856a96a4216353a201ff5f42e3ef64..ceee3803f9b1ad3eef8b7abd45dc1327c062738c:/tilelib_test.go diff --git a/tilelib_test.go b/tilelib_test.go index 6d6ff5abb8..5801b9baf3 100644 --- a/tilelib_test.go +++ b/tilelib_test.go @@ -1,7 +1,12 @@ -package main +// Copyright (C) The Lightning Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +package lightning import ( "bytes" + "regexp" "strings" "gopkg.in/check.v1" @@ -32,6 +37,8 @@ gttattaataataacttatcatca } func (s *tilelibSuite) TestSkipOOO(c *check.C) { + matchAllChromosomes := regexp.MustCompile(".") + // tags appear in seq: 4, 0, 2 (but skipOOO is false) tilelib := &tileLibrary{taglib: &s.taglib, skipOOO: false} tseq, _, err := tilelib.TileFasta("test-label", bytes.NewBufferString(">test-seq\n"+ @@ -40,7 +47,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[0]+ "cccccccccccccccccccc\n"+ s.tag[2]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{4, 1}, {0, 1}, {2, 1}}}) @@ -52,7 +59,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[1]+ "ggggggggggggggggggggggg\n"+ s.tag[2]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {2, 1}}}) @@ -64,7 +71,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[3]+ "ggggggggggggggggggggggg\n"+ s.tag[4]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{2, 1}, {3, 1}, {4, 1}}}) @@ -76,7 +83,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[0]+ "ggggggggggggggggggggggg\n"+ s.tag[2]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {2, 1}}}) @@ -88,7 +95,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[2]+ "ggggggggggggggggggggggg\n"+ s.tag[1]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}}}) @@ -102,7 +109,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[1]+ "ggggggggggggggggggggggg\n"+ s.tag[2]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {2, 1}}}) @@ -118,7 +125,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[0]+ "ggggggggggggggggggggggg\n"+ s.tag[4]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {3, 1}, {4, 1}}}) @@ -130,7 +137,7 @@ func (s *tilelibSuite) TestSkipOOO(c *check.C) { s.tag[1]+ "ggggggggggggggggggggggg\n"+ s.tag[3]+ - "\n")) + "\n"), matchAllChromosomes, false) c.Assert(err, check.IsNil) c.Check(tseq, check.DeepEquals, tileSeq{"test-seq": []tileLibRef{{0, 1}, {1, 1}, {3, 1}}}) }