seismicrna.core.batch.tests package

Submodules

class seismicrna.core.batch.tests.accum_test.TestAccumulateBatches(methodName='runTest')

Bases: TestCase

test_cluster_2_batches()

. = Match ! = Mutation ? = Ambiguous _ = Not Covered

3468 ACGT C1 C2

7 !!!_ 0.5 0.5

0 !!._ 0.6 0.4 6 ?.._ 0.8 0.2

test_mask_2_batches()

. = Match ! = Mutation ? = Ambiguous _ = Not Covered

3468 ACGT

7 !!!_

0 !!._ 6 ?.._

test_relate_1_batch()

. = Match ! = Mutation ? = Ambiguous _ = Not Covered

1234 ACGT

2 !!!_ 3 !!._ 4 ?.._

test_relate_2_batches()

. = Match ! = Mutation ? = Ambiguous _ = Not Covered

1234 ACGT

2 !!!_

0 !!._ 1 ?.._

seismicrna.core.batch.tests.accum_test.get_batch_count_all_func(batches: list[RegionMutsBatch])
class seismicrna.core.batch.tests.confusion_test.TestCalcConfusionMatrix(methodName='runTest')

Bases: TestCase

test_clusters()

Pos.

Rd. 2579 0 ==== 2 A=C= 3 =G=T 5 .G=. 8 ..== 9 T-=.

test_no_clusters()

Pos.

Rd. 2579 0 ==== 2 A=C= 3 =G=T 5 .G=. 8 ..== 9 T-=.

class seismicrna.core.batch.tests.confusion_test.TestCalcConfusionPhi(methodName='runTest')

Bases: TestCase

test_dataframe()
test_series()
class seismicrna.core.batch.tests.confusion_test.TestCountIntersection(methodName='runTest')

Bases: TestCase

test_0_overlap()
test_count_intersect()
test_empty()
test_first_overlap()
test_last_overlap()
test_middle_overlap()
class seismicrna.core.batch.tests.confusion_test.TestInitConfusionMatrix(methodName='runTest')

Bases: TestCase

test_clusters()
test_no_clusters()
test_no_clusters_min_gap()
class seismicrna.core.batch.tests.confusion_test.TestLabelSignificantPVals(methodName='runTest')

Bases: TestCase

test_2d()
test_against_reference_implementation()
test_all_or_none()
test_alpha_validation()
test_basic_hand_calcs()
test_dtype_and_shape_preserved()
test_invalid_pvalues_raise()
test_monotonicity_property()
test_nan_are_ignored_and_false()
test_order_invariance()
test_pandas_series_roundtrip()
test_rejects_values_failing_own_rank_due_to_global_cutoff()
test_ties_including_cutoff()
seismicrna.core.batch.tests.confusion_test.bh_ref_mask(p, alpha)

Reference BH step-up (finite p only), returns boolean mask.

class seismicrna.core.batch.tests.count_test.TestCalcCountPerPos(methodName='runTest')

Bases: TestCase

test_average()

11 13 14 15

Read A C G T

0 1 64 1 255 1 255 255 1 255 5 128 1 1 16 6 255 1 1 17 7 1 64 1 255 9 128 1 1 1

10 1 1 1 255 11 1 1 1 1 14 64 3 1 1 16 255 255 1 1

test_clusters()

11 13 14 15

Read A C G T

0 1 64 1 255 1 255 255 1 255 5 128 1 1 16 6 255 1 1 17 7 1 64 1 255 9 128 1 1 1

10 1 1 1 255 11 1 1 1 1 14 64 3 1 1 16 255 255 1 1

class seismicrna.core.batch.tests.count_test.TestCalcCountPerRead(methodName='runTest')

Bases: TestCase

test_average()

11 13 14 15 17

Read A C G T C

0 1 64 1 255 255 1 255 255 1 255 255 5 128 1 1 16 1 6 255 1 1 17 64 7 1 64 1 255 255 9 128 1 1 1 16

10 1 1 1 255 255 11 1 1 1 1 1 14 64 3 1 1 128 16 255 255 1 1 2

class seismicrna.core.batch.tests.count_test.TestCalcCoverage(methodName='runTest')

Bases: TestCase

test_0_positions()
test_0_positions_weighted()
test_1_position()
test_1_segment()

1234567890123

test_1_segment_mask()

1234567890123

.

test_1_segment_redundant()

1234567890123


test_1_segment_redundant_weighted()

1234567890123 C1 C2

——- 0.6 0.2
——- 0.5 0.3

——- 0.9 0.8

——- 0.4 1.0

——- 0.1 0.7

test_1_segment_weighted()

1234567890123 C1 C2

  • 0.1 1.5

– 0.2 1.4 — 0.3 1.3

— 0.4 1.2
  • 0.5 1.1

— 0.6 1.0

——- 0.7 0.9 ————- 0.8 0.8

——- 0.9 0.7
— 1.0 0.6
  • 1.1 0.5

— 1.2 0.4
— 1.3 0.3
– 1.4 0.2
  • 1.5 0.1

test_2_segments_mask()

01234567890123

[—]

][

[—] ][

[—]

][

[—]

][

[—]

[===]

][

[===]

][ [===]

][

[===]

][

[===]

test_2_segments_nomask()

1234567890123

=

class seismicrna.core.batch.tests.count_test.TestCalcRelsPerPos(methodName='runTest')

Bases: TestCase

test_average()

11 13 14 15

Read A C G T

0 1 64 1 255 1 255 255 1 255 5 128 1 1 16 6 255 1 1 17 7 1 64 1 255 9 128 1 1 1

10 1 1 1 255 11 1 1 1 1 14 64 3 1 1 16 255 255 1 1

test_clusters()

11 13 14 15

Read A C G T

0 1 64 1 255 1 255 255 1 255 5 128 1 1 16 6 255 1 1 17 7 1 64 1 255 9 128 1 1 1

10 1 1 1 255 11 1 1 1 1 14 64 3 1 1 16 255 255 1 1

class seismicrna.core.batch.tests.count_test.TestCalcRelsPerRead(methodName='runTest')

Bases: TestCase

test_average()

11 13 14 15 17

Read A C G T C

0 1 64 1 255 255 1 255 255 1 255 255 5 128 1 1 16 1 6 255 1 1 17 64 7 1 64 1 255 255 9 128 1 1 1 16

10 1 1 1 255 255 11 1 1 1 1 1 14 64 3 1 1 128 16 255 255 1 1 2

class seismicrna.core.batch.tests.count_test.TestCountEndCoords(methodName='runTest')

Bases: TestCase

test_length_0()
test_length_1()
test_length_2_diff()
test_length_2_same()
test_length_3_diff_weights()
test_length_3_same_weights()
test_length_3_same_weights_int()
class seismicrna.core.batch.tests.ends_test.TestCountReadsSegments(methodName='runTest')

Bases: TestCase

test_non_array()
test_valid()
test_wrong_dims()
class seismicrna.core.batch.tests.ends_test.TestFindContiguousReads(methodName='runTest')

Bases: TestCase

test_0_segments()
test_1_segment()
test_2_segments_mask()
test_2_segments_nomask()
class seismicrna.core.batch.tests.ends_test.TestFindReadEnd3s(methodName='runTest')

Bases: TestCase

test_0_segments()
test_1_segment_masked()
test_1_segment_none_masked()
test_2_segments_both_masked()
test_2_segments_masked()
test_2_segments_none_masked()
class seismicrna.core.batch.tests.ends_test.TestFindReadEnd5s(methodName='runTest')

Bases: TestCase

test_0_segments()
test_1_segment_masked()
test_1_segment_none_masked()
test_2_segments_both_masked()
test_2_segments_masked()
test_2_segments_none_masked()
class seismicrna.core.batch.tests.ends_test.TestMatchReadsSegments(methodName='runTest')

Bases: TestCase

test_match()
class seismicrna.core.batch.tests.ends_test.TestMergeReadEnds(methodName='runTest')

Bases: TestCase

test_mismatch()
test_valid()
test_wrong_dims()
class seismicrna.core.batch.tests.ends_test.TestSortSegmentEnds(methodName='runTest')

Bases: TestCase

test_0_segments()
test_1_segment_mask()
test_1_segment_nomask()
test_2_segments_mask()
test_2_segments_nomask()
test_n_segments_contig()
test_n_segments_discontig()
class seismicrna.core.batch.tests.muts_test.TestCalcMutsMatrix(methodName='runTest')

Bases: TestCase

test_full_reads_no_muts()
test_full_reads_no_muts_some_masked()
test_paired_reads_masked_segments()
test_paired_reads_no_muts()
test_partial_reads_muts()
test_partial_reads_no_muts()
test_partial_reads_no_muts_some_masked()