seismicrna.relate.aux.tests package

Submodules

class seismicrna.relate.aux.tests.cigarop_test.TestCigarOp(methodName='runTest')

Bases: TestCase

Test class CigarOp.

ops = ('M', '=', 'X', 'D', 'I', 'S')
test_cigar_init_invalid()

Test that CigarOp instances cannot be created with invalid operations.

test_cigar_init_valid()

Test that CigarOp instances can be created.

test_cigar_lengthen()

Test lengthening CIGAR operations.

test_cigar_str()

Test string representations of CIGAR operations.

class seismicrna.relate.aux.tests.cigarop_test.TestCountCigarMuts(methodName='runTest')

Bases: TestCase

Test function count_cigar_muts.

test_cigar_match_subst_valid()

Count mutations in a valid CIGAR string.

class seismicrna.relate.aux.tests.cigarop_test.TestFindCigarOpPosRead(methodName='runTest')

Bases: TestCase

Test function find_cigar_op_pos.

test_cigar_m_aln_valid()

Find aligned positions in a CIGAR string with M codes.

test_cigar_m_del_valid()

Find deletions in a CIGAR string with M codes.

test_cigar_m_ins_valid()

Find insertions in a CIGAR string with M codes.

test_cigar_m_mat_valid()

Find matches in a CIGAR string with M codes.

test_cigar_m_scl_valid()

Find soft clippings in a CIGAR string with M codes.

test_cigar_m_sub_valid()

Find substitutions in a CIGAR string with M codes.

test_cigar_xeq_aln_valid()

Find aligned positions in a CIGAR string with =/X codes.

test_cigar_xeq_del_valid()

Find deletions in a CIGAR string with =/X codes.

test_cigar_xeq_ins_valid()

Find insertions in a CIGAR string with =/X codes.

test_cigar_xeq_mat_valid()

Find matches in a CIGAR string with =/X codes.

test_cigar_xeq_scl_valid()

Find soft clippings in a CIGAR string with =/X codes.

test_cigar_xeq_sub_valid()

Find substitutions in a CIGAR string with =/X codes.

class seismicrna.relate.aux.tests.infer_test.TestInferRead(methodName='runTest')

Bases: TestCase

Test function infer_read.

assert_equal(refseq: DNA, relvecs: Iterable[tuple[int, int, dict[int, int]]], expects: Iterable[tuple[str, str, str]])

Assert that the actual and expected outputs match.

assert_raise(ref: DNA, relvecs: Iterable[tuple[int, int, dict[int, int]]], error: type[Exception], regex: str)

Assert that the relation vectors raise an exception.

test_all_match()

Test when the read has four matching bases.

test_all_match_n()

Test when the read has four matching bases and an ambiguous base.

test_delete_invalid()

Test when the read has a deletion at either end.

test_delete_valid()

Test when the read has deletions.

test_insert3_end3_invalid()

Test when the read has an insertion at the 3’ end.

test_insert3_non_match_valid()

Test when the read has insertions next to substitutions or low-quality base calls.

test_insert3_valid()

Test when the read has insertions.

test_insert5_end5_invalid()

Test when the read has an insertion at the 5’ end.

test_insert5_non_match_valid()

Test when the read has insertions next to substitutions or low-quality base calls.

test_insert5_valid()

Test when the read has insertions.

test_insert_deletion_invalid()

Test when the read has an insertion next to a deletion.

test_low_qual_valid()

Test when the read has a low-quality base.

test_nocov_valid()

Test when the read does not cover one or both ends of the reference.

test_subst_invalid()

Test when the read has an invalid substitution.

test_subst_valid()

Test when the read has a substitution.

class seismicrna.relate.aux.tests.iterrel_test.TestIterRelvecsAll(methodName='runTest')

Bases: TestCase

assert_equal(ref: DNA, expects: list, insert3: bool)

Check that the expected and actual results match.

test_length_1()

Test with all length-1 DNA sequences.

test_length_2()

Test with all length-2 DNA sequences.

test_length_3()

Test with all length-3 DNA sequences.

class seismicrna.relate.aux.tests.iterrel_test.TestIterRelvecsQ53(methodName='runTest')

Bases: TestCase

Test function iter_relvecs_q53.

static list_rels(seq: str, low_qual: Sequence[int] = (), end5: int | None = None, end3: int | None = None, insert3: bool = True, max_ins: int | None = None)

Convenience function to run rel.iter_relvecs_q53 from a sequence of str and return a list of lists of ints.

test_a()

Test with sequence ‘A’.

test_aa_insert3()

Test with sequence ‘AA’.

test_aa_insert5()

Test with sequence ‘AA’.

test_agg_insert3()

Test with sequence ‘AGG’.

test_agg_insert5()

Test with sequence ‘AGG’.

test_c()

Test with sequence ‘C’.

test_g()

Test with sequence ‘G’.

test_low_qual()

Test with each low-quality base.

test_low_qual_invalid()

Test that invalid low-qual positions raise ValueError.

test_n()

Test with sequence ‘N’.

test_t()

Test with sequence ‘T’.

test_type()

Test that the function yields (int, int, dict) tuples.

test_xaax_insert3()

Test that bases with no coverage are marked.

test_xaax_insert5()

Test that bases with no coverage are marked.