-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from bcgsc/fix-wrappers
Fix wrappers
- Loading branch information
Showing
9 changed files
with
7,777 additions
and
7,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/install/ | ||
/__build-compile/ | ||
/Doxyfile.bak | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>1 | ||
CGCGTGAAAGCAAAACAAGA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import btllib | ||
import unittest | ||
|
||
class BloomFilterTests(unittest.TestCase): | ||
|
||
def test_seq_insertion(self): | ||
seq, k = 'AGTCATCGACTGATGC', 5 | ||
bf = btllib.KmerBloomFilter(1024, 3, k) | ||
bf.insert(seq) | ||
self.assertEqual(bf.contains('TCATC'), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os | ||
import btllib | ||
import unittest | ||
|
||
|
||
class SeqReaderTests(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.base_dir = os.path.dirname(__file__) | ||
|
||
def test_seq_reader_single_seq(self): | ||
seq = 'CGCGTGAAAGCAAAACAAGA' | ||
path = os.path.join(self.base_dir, 'single_seq.fa') | ||
with btllib.SeqReader(path, btllib.SeqReaderFlag.SHORT_MODE) as reader: | ||
read = [record.seq for record in reader] | ||
self.assertListEqual([seq], read) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.