Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9eed9ae
some bulk loading/cleaning tests
ctb Feb 19, 2017
c0c5d2c
nail down existing ACTGN behavior
ctb Feb 19, 2017
e77f1e1
add tests for various trim functions w/bad DNA input
ctb Feb 19, 2017
33a7702
fixed
ctb Feb 19, 2017
adfe3b9
tset current output_partitions behavior in subset.cc
ctb Feb 20, 2017
5adf7bf
add test for trim_on_stoptags
ctb Feb 20, 2017
dac7996
Merge branch 'master' of github.com:dib-lab/khmer into remove/is_vali…
ctb Feb 25, 2017
fe48787
fix comments to be clearer
ctb Feb 25, 2017
756454e
fix pep8
ctb Feb 25, 2017
2db8180
moved read validity foo over to test_sequence_validation.py
ctb Feb 25, 2017
870678e
split tests out to test_sequence_validation
ctb Feb 25, 2017
b2b22d7
parameterized with tabletype
ctb Feb 25, 2017
12b88a5
add exceptions
ctb Feb 25, 2017
d303d46
Add a fixture for ReadParser use
betatim Feb 28, 2017
28a1c7b
Merge remote-tracking branch 'origin/master' into remove/is_valid_dna…
ctb Mar 19, 2017
08d2f28
fix setup.py for offline operation
ctb Mar 19, 2017
29ed275
fix pytest fixture problem on my laptop
ctb Mar 19, 2017
18d8577
introduce graphtype fixture
ctb Mar 19, 2017
4c9c63b
check the number of tags created by consume_fasta_and_tag
ctb Mar 19, 2017
5e01a81
add partition IDs to valid-dna testing fq
ctb Mar 19, 2017
85b8fa2
add test for output_partitions
ctb Mar 19, 2017
f61e37c
increase ksize to 15 for partition reading tests
ctb Mar 19, 2017
b1519a3
add tests for labelhash
ctb Mar 19, 2017
08eca98
uncomment pytest-runner req
ctb Mar 19, 2017
caa85b4
remove unnecessary imports
ctb Mar 19, 2017
bf94884
remove line spacing
ctb Mar 19, 2017
15bc92c
distinguished tabletype from countingtype
ctb Mar 19, 2017
6304e2f
remove commented-out code
ctb Mar 19, 2017
d2a20d8
add a test where bad DNA is at beginning of string
ctb Mar 19, 2017
86e7081
write test for consume_partitioned_fasta on unpartitioned file
ctb Mar 19, 2017
4010999
Merge branch 'fix/consume_partitioned_err' into remove/is_valid_dna_t…
ctb Mar 19, 2017
f47a360
add space in reporting
ctb Mar 19, 2017
a294688
Merge branch 'fix/consume_partitioned_err' into remove/is_valid_dna_t…
ctb Mar 19, 2017
7e9c7a0
add partition ID to new 'bad' sequence
ctb Mar 19, 2017
e419a7b
address review comments <- minor changes
ctb Mar 20, 2017
3cb741b
re-added reads.close to yield_fixture
ctb Mar 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/read_parsers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ inline PartitionID _parse_partition_id(std::string name)
if (*s == '\t') {
p = (PartitionID) atoi(s + 1);
} else {
std::cerr << "consume_partitioned_fasta barfed on read "
<< name << "\n";
throw khmer_exception();
std::string err;
err = "consume_partitioned_fasta cannot find partition ID for read ";
err += name;

throw khmer_value_exception(err);
}

return p;
Expand Down
36 changes: 36 additions & 0 deletions tests/test-data/valid-read-testing.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@895:1:1:1246:14654 1:N:0:NNNNN 1
CAGGCGCCCACCACCGTGCCCTCCAACCTGATGGT
+
][aaX__aa[`ZUZ[NONNFNNNNNO_____^RQ_
@895:1:1:1248:9583 1:N:0:NNNNN 2
ACTGGGCGTAGACGGTGTCCTCATCGGCACCAGC
+
\UJUWSSV[JQQWNP]]SZ]ZWU^]ZX][^TXR`
@895:1:1:1252:19493 1:N:0:NNNNN 3
CCGGCGTGGTTGGTGAGGTCACTGAGCTTCATGTC
+
OOOKONNNNN__`R]O[TGTRSY[IUZ]]]__X__
@895:1:1:1255:18861 1:N:0:NNNNN 4
ACGACGAGAAGCTGATCTACCGCGCCGAGCGCATC
+
bb_^^bb_XTbbbbbb_bab]KTITZQTZ]ZYT^^
@lowercase_to_uppercase 5
caggcgcccaccaccgtgccctccaacctgatggt
+
][aaX__aa[`ZUZ[NONNFNNNNNO_____^RQ_
@n_in_read 6
ACTGGGCGTAGNCGGTGTCCTCATCGGCACCAGC
+
\UJUWSSV[JQQWNP]]SZ]ZWU^]ZX][^TXR`
@zy_in_read 7
CCGGCGTGGTTZZYAGGTCACTGAGCTTCATGTC
+
OOOKONNNNN__`R]O[TGTRSY[IUZ]]]__X__
@895:1:1:1255:18861 1:N:0:NNNNN 8
ACGACGAGAAGCTGATCTACCGCGCCGAGCGCATC
+
bb_^^bb_XTbbbbbb_bab]KTITZQTZ]ZYT^^
@bad_dna_in_beginning 9
YGAGCTGAGAGCTGAGAGCTGA
+
bbbbbbbbbbbbbbbbbbbbbb
8 changes: 8 additions & 0 deletions tests/test_nodegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ def test_load_partitioned():
assert nodegraph.get(third_s)


def test_consume_partitioned_fail():
inpfile = utils.get_test_data('test-reads.fa')
nodegraph = khmer._Nodegraph(32, [1])

with pytest.raises(ValueError):
nodegraph.consume_partitioned_fasta(inpfile)


def test_count_within_radius_simple():
inpfile = utils.get_test_data('all-A.fa')
nodegraph = khmer._Nodegraph(4, [3, 5])
Expand Down
Loading