Skip to content

Commit

Permalink
clippy fixes; rm comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Dec 12, 2024
1 parent af2af55 commit 28781bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/core/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ impl SeqToHashes {

// Generate frames based on sequence type and hash function
let frames = if hash_function.dna() {
Self::dna_frames(&seq)
Self::dna_frames(seq)
} else if is_protein {
Self::protein_frames(&seq, &hash_function)
Self::protein_frames(seq, &hash_function)
} else if hash_function.protein() || hash_function.dayhoff() || hash_function.hp() {
Self::translated_frames(&seq, &hash_function)
Self::translated_frames(seq, &hash_function)
} else if hash_function.skipm1n3() || hash_function.skipm2n3() {
Self::skipmer_frames(&seq, &hash_function, ksize)
Self::skipmer_frames(seq, &hash_function, ksize)
} else {
unimplemented!();
};
Expand Down
5 changes: 0 additions & 5 deletions tests/test_sourmash_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ def test_protein_override_bad_rust_foo():
with pytest.raises(ValueError) as exc:
sig.add_protein(record.sequence)

# assert 'Invalid hash function: "DNA"' in str(exc)

# this case now ends up in the "DNA" section of SeqToHashes,
# so we run into the invalid k-mer error
# instead of invalid Hash Function.
assert "invalid DNA character in input k-mer: MRVLKFGGTS" in str(exc)


Expand Down

0 comments on commit 28781bc

Please sign in to comment.